Jump to:

23371 Posts in 18161 Topics by 2865 members

General Questions

SilverStripe Forums » General Questions » Tokenized use of variables in page content

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

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

Page: 1
Go to End
Author Topic: 867 Views
  • NateW
    Avatar
    Community Member
    2 Posts

    Tokenized use of variables in page content Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Tokenized use of variables in page content Link to this post

    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/

  • NateW
    Avatar
    Community Member
    2 Posts

    Re: Tokenized use of variables in page content Link to this post

    Thanks Will, I will give it a try tonight.

    867 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.