Custom inline variables
Posted: Fri Oct 08, 2010 9:18 am
I'm using a content management system and would like to give users the ability to insert snippets/variables that could then be processed by the php and load specific content into the space.
An example would be something like:
[[gallery:landscapes]]
The user would insert that into the WYSIWYG then when the page was processed I would like it to identify the two components
1.) The 'gallery' variable
2.) The 'landscapes' variable (so the 'landscapes' gallery could be inserted into the page)
I'm assuming regex is the way to go on this but I can't seem to find a good way to get this working.
An example would be something like:
[[gallery:landscapes]]
The user would insert that into the WYSIWYG then when the page was processed I would like it to identify the two components
1.) The 'gallery' variable
2.) The 'landscapes' variable (so the 'landscapes' gallery could be inserted into the page)
I'm assuming regex is the way to go on this but I can't seem to find a good way to get this working.