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, biapar, Willr, Ingo, swaiba, simon_w

Using array data in a cms html text area?


Reply

3 Posts   531 Views

Avatar
Futureweb

30 August 2011 at 12:03pm Community Member, 233 Posts

Hello

I've got a function in my page controller that returns an array of details of a user out of 3rd party marketing system - firstname, lastname, email etc.

I can use this info in the SS template, but I would like to I would like to be able to input something like "hello $firstname $lastname, how are you " into a text field the CMS.

Any ideas how I can make the cms text field merge the details from the array?

thanks

Avatar
Willr

30 August 2011 at 2:57pm Forum Moderator, 5511 Posts

Perhaps try using short codes. SSBits has a good tutorial - http://www.ssbits.com/tutorials/2010/2-4-using-short-codes-to-embed-a-youtube-video/

Avatar
Futureweb

5 September 2011 at 12:45pm Community Member, 233 Posts

Thanks Will,

got something working based on that.

Cheers