Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Calling a "command" from within the page content?


Go to End
Reply


3 Posts   616 Views

Avatar
LinseyM

Community Member, 99 Posts

9 March 2013 at 4:09am

Edited: 09/03/2013 4:09am

Hi all!

How would I go about calling a command (tag?) from within the WYSIWYG editor, in order to place a CMS menu within the page content. EG, in the way that placing "$UserDefinedForm" within the page content editor places the form where you want it to go, and lets you have text above and below it?

I have a menu within the template that currently sits below the $Content tag, but i'd like to be able to call it from within the actual content so that I can decide precisely where it goes, eg something like:

-----
This is my heading

Some content

$CallMenu

Some more content
-----

Hope this makes sense - struggling to explain it!

Cheers, L x

Avatar
Willr

Forum Moderator, 5521 Posts

9 March 2013 at 12:00pm

Avatar
LinseyM

Community Member, 99 Posts

9 March 2013 at 12:29pm

Brilliant thanks Will! I just didn't know what terms to search for to find this info. Short codes will do exactly what I need, but the str_replace is good to be aware of too. Cheers :-)