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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

Tokenized use of variables in page content


Go to End


3 Posts   1329 Views

Avatar
NateW

Community Member, 2 Posts

18 June 2010 at 9:19am

Hi everyone, I'm just getting to grips with SilverStripe for a new client. I want the client to be able to choose where to put a list of latest items from an RSS feed on a page by using something like the variables in a template -- like being able to use $MyExternalRSSFeed in the CMS and have it treat it as it would if it were in Page.ss. I think I'm pretty much there pulling in the RSS feed by integrating SimplePie (thanks to another post in the forums), but I'm not sure about the best way to go about it so that my client can call a variable in the CMS.

I found this post from 2009 suggesting that it 2.4 would have some kind of tokenized support for this. I don't really have any idea what tokenized support means.

Did this make it into 2.4 and how would I go about doing this? If it didn't, I'm fine with using the suggestion posted in that thread. But if there's a preferred way to do this, I'd like to learn to use that as I hope to use SilverStripe for future projects as well.

Thanks for any advice you can provide.

Avatar
Willr

Forum Moderator, 5523 Posts

18 June 2010 at 4:09pm

Hi NateW,

Welcome to the forums! I made that orignal post. Yes its in 2.4. Its called 'ShortCodes' which does what I was explaining. A short tutorial is available on ssbits.

http://doc.silverstripe.org/shortcodes
http://ssbits.com/2-4-using-short-codes-to-embed-a-youtube-video/

Avatar
NateW

Community Member, 2 Posts

18 June 2010 at 11:24pm

Thanks Will, I will give it a try tonight.