You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

  1.  Create a light module called 'symlinktest'

    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules\-> mgnl create-light-module symlinktest
    info Using configuration at /usr/local/lib/node_modules/@magnolia/cli/lib/config/mgnl-cli.json
    info Using prototypes at /usr/local/lib/node_modules/@magnolia/cli/lib/config/mgnl-cli-prototypes
    info 'No path option provided, light module will be created in the current folder.'
    info Resource folder /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest created.
    info Resource folder /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/dialogs/components created.
    info Resource folder /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/dialogs/pages created.
    info Resource folder /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/templates/components created.
    info Resource folder /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/templates/pages created.
    info Resource folder /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/webresources/css created.
    info Resource folder /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/webresources/js created.
    info Resource folder /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/decorations created.
    info Resource folder /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/i18n created.
    info /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/README.md created
    info Module symlinktest created at /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest
    info Success! In order to add a page, run mgnl create-page $YOUR_PAGE_NAME -p /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest
    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules\->
  2.  Add a Page Template called 'symlinky'

    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules\-> cd symlinktest/
    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest\-> mgnl create-page symlinky
    info No path option provided, page template will be created in the current folder.
    info /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/templates/pages/symlinky.yaml created
    info /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/templates/pages/symlinky.ftl created
    info /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/dialogs/pages/symlinky.yaml created
    info Page template created
    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest\->
  3.  Add a Component Template 'symlinkarino'

    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest\-> mgnl create-component symlinkarino --available symlinky@main
    info Using configuration at /usr/local/lib/node_modules/@magnolia/cli/lib/config/mgnl-cli.json
    info Using prototypes at /usr/local/lib/node_modules/@magnolia/cli/lib/config/mgnl-cli-prototypes
    info No path option provided, component will be created relative to the current folder.
    info Component created
    info /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/templates/components/symlinkarino.yaml created
    info /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/templates/components/symlinkarino.ftl created
    info /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/dialogs/components/symlinkarino.yaml created
    info Created new area main at the end of /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/templates/pages/symlinky.ftl
    info Availability for symlinktest:components/symlinkarino added into /Users/bandersen/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest/templates/pages/symlinky.yaml
    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules/symlinktest\->
  4. Fix the [@cms.area name="main" /] issue generated by the CLI
  5. Create a 'symlinky' Page, and add a 'symlinkarino' component to the main area - this is just to make sure it works without symlinks

  6.  Now let's move that light module, and make a symlink to it, and see if anything changes

    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules\-> ls
    symlinktest
    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules\-> mv symlinktest/ ..
    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules\-> ls
    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules\-> ln -s ../symlinktest/
    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules\-> ll
    total 0
    drwxr-xr-x  8 bandersen  staff  256 Sep 27 18:51 ..
    lrwxr-xr-x  1 bandersen  staff   15 Sep 27 18:51 symlinktest -> ../symlinktest/
    drwxr-xr-x  3 bandersen  staff   96 Sep 27 18:51 .
    ~/Desktop/REWE/__DAY__TWO__/daytwo/light_modules\->
  7.  For me, it works



  • No labels