mirror of
https://github.com/Karaka-Management/Developer-Guide.git
synced 2026-01-11 12:28:41 +00:00
Fixing concept changes (resource versioning)
This commit is contained in:
parent
e3651ffe1c
commit
a2e35a5d97
|
|
@ -14,12 +14,12 @@ Example usage for 30 days caching:
|
|||
$resposne->setHeader('Cache-Control', 'Cache-Control: max-age=2592000');
|
||||
```
|
||||
|
||||
In order to trigger a re-cache of stylesheets or javascript files make sure to include their version hash as file name. This way version updates will result in a new file name and will be re-cached by the client browser.
|
||||
In order to trigger a re-cache of stylesheets or javascript files make sure to update the version in the `Controller.php` file. This way version updates will result in a new virtual file uri and result in a re-cache.
|
||||
|
||||
Example usage:
|
||||
|
||||
```
|
||||
$head->addAsset(AssetType::JS, $request->getUri()->getBase() . 'Modules/Media/ModuleMedia_' . self::$version . '.js');
|
||||
$head->addAsset(AssetType::JS, $request->getUri()->getBase() . 'Modules/Media/ModuleMedia.js?v=' . self::MODULE_VERSION);
|
||||
```
|
||||
|
||||
## Sessions
|
||||
|
|
|
|||
11
modules.md
11
modules.md
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
The following directory structure should roughly visualize how modules are strucured. The purpose of the different sub-directories and their files will be covered in the following sections.
|
||||
|
||||
* UniqueModuleName
|
||||
* {UniqueModuleName}
|
||||
* Admin
|
||||
* Install
|
||||
* Navigation.install.json
|
||||
|
|
@ -35,7 +35,7 @@ The following directory structure should roughly visualize how modules are struc
|
|||
* YourJavaScriptViews.js
|
||||
* Controller.php
|
||||
* Controller.js
|
||||
* ModuleUniqueModuleName_1.0.0.js
|
||||
* Module{UniqueModuleName}.js
|
||||
* info.json
|
||||
|
||||
All modules are located inside the `/Modules` directory and their directory name has to be the module name itself without whitespaces.
|
||||
|
|
@ -123,7 +123,7 @@ The Theme directory contains the current theme for every page this module suppor
|
|||
|
||||
### Css
|
||||
|
||||
Every page has its own CSS directory. This application only allows the use of SASS/SCSS as preprocessor. All sass/scss files need to be provided as well as the processed CSS files. Make sure to include the version number in the CSS file name for overwriting the cache on updates. CSS files need to be minimized and if it makes sense concatenated.
|
||||
Every page has its own CSS directory. This application only allows the use of SASS/SCSS as preprocessor. All sass/scss files need to be provided as well as the processed CSS files. Make sure to update the version number in the `Controller.php` file. CSS files need to be minimized and if it makes sense concatenated.
|
||||
|
||||
### Img
|
||||
|
||||
|
|
@ -135,13 +135,14 @@ The Lang directory contains all language files for this application. Usually the
|
|||
|
||||
A language file should have the following naming convention:
|
||||
|
||||
{ISO 639-1}.lang.php
|
||||
{ISO 639-1}.lang.php
|
||||
{UniqueModuleName}.{ISO 639-1}.lang.php
|
||||
|
||||
The content of the language file is straight forward:
|
||||
|
||||
```
|
||||
<?php
|
||||
$MODLANG['UniqueModuleName'] = [
|
||||
$MODLANG['{UniqueModuleName}'] = [
|
||||
'StringID' => 'Your localized string',
|
||||
];
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user