Posts

Showing posts from November, 2018

Symlinks and Static Resources

Image
Symlinks What are they? The ModX website describes symlinks as below: "A MODx Revolution symlink simply takes the content of one resource and displays it in another." This means you can have two different urls that display the same content. Why use them? The more I used ModX the more I found getResources really useful. It took a while to wrap my head around it at first, but, once I did, I discovered it can be used as a useful to display a variable amount of content. For example, I have a page with various cards - when you click on a card a modal pops up with particular details depending on the card you picked. I wanted these cards to be easily customisable, and not be restricted by the number of template variables I code in. I created a template which would be the main page. I then created a template which would be used for each of the feature items - this was mainly to hold the template variables I would need. But now I have a new document for each o