Resource shorthands

  • Here some hints about using shorthands with resource paths.

    pre-registered

    Theme

    using an activated theme with 'name' => 'my-theme' in your index.php in /pagekit/packages/sab/example

    shortcut resolves to examples
    theme: /pagekit/packages/sab/my-theme theme:app/bundle/script.js
    -> /pagekit/packages/sab/my-theme/app/bundle/script.js
    views /pagekit/packages/sab/my-theme/views views:menu.php
    -> /pagekit/packages/sab/my-theme/views/menu.php


    Extension

    using an extension with 'name' => 'my-extension' in your index.php in /pagekit/packages/sab/example

    shortcut resolves to examples
    my-extension: /pagekit/packages/sab/my-extension my-extension:app/bundle/script.js
    -> /pagekit/packages/sab/example/app/bundle/script.js
    views:my-extension /pagekit/packages/sab/my-extension/views views:my-extension/menu.php
    -> /pagekit/packages/sab/my-theme/views/menu.php
    shortcut for views:my-extension
    my-extension
    /pagekit/packages/sab/my-extension/views my-extension/menu.php
    -> /pagekit/packages/sab/my-theme/views/menu.php


    self-registered

    index.php at /pagekit/packages/sab/my-extension

    Code
    1. 'resources' => [
    2. 'my-extension/bundle' => 'app/bundle', // /pagekit/packages/sab/my-extension/app/bundle
    3. 'my-extension/css' => 'assets/css', // /pagekit/packages/sab/my-extension/assets/css
    4. 'my-extension/js' => 'assets/js, // /pagekit/packages/sab/my-extension/assets/js
    5. ]

    The LORD is my strength and my shield; in him my heart trusts, and I am helped; my heart exults, and with my song I give thanks to him. Psalm 28,7

    Edited once, last by SAB ().