2020-08-25, 17:08:31
You can build your path as you like, just keep it dynamic, it might save you a lot of work later when migrating to another environment.
Let's say your "framework" directory is located in:
And the file representing the entry point for your application is located:
Sure, with ItemManager you can set your own templates and completely customize the look of your application.
Default file upload template can be found at: "/imanager/tpls/fields/fileupload.tpl"
See also Scriptor CMS. Scriptor is completely based on ItemManager and does not use the Font Awesome lib anymore, so its fields look completely different: https://scriptor-cms.info/documentation/...n/content/
Let's say your "framework" directory is located in:
Code:
/var/www/project6/framework/imanager.php
And the file representing the entry point for your application is located:
Code:
/var/www/project6/GetSimple/site/theme/whatever/backend.php
PHP Code:
// PHP 7 +
var_dump( dirname(__DIR__, 4) );
// < PHP 7
var_dump( dirname(dirname(dirname(dirname(__DIR__)))) );
// Or
var_dump( realpath('../../../../'));
...
Sure, with ItemManager you can set your own templates and completely customize the look of your application.
Default file upload template can be found at: "/imanager/tpls/fields/fileupload.tpl"
PHP Code:
// to build a custom template from a file use
$tpl = $this->imanager->templateParser->render(
file_get_contents('path/to-your/templates/fileupload.tpl'), [
'YOUR_VAR' => 'Value',
'YOUR_VAR_2' => 'Value-2',
]
);
PHP Code:
// finally, you can pass your template to the field widget as following:
$widget->set('fileUploadTpl', $tpl, false);
See also Scriptor CMS. Scriptor is completely based on ItemManager and does not use the Font Awesome lib anymore, so its fields look completely different: https://scriptor-cms.info/documentation/...n/content/