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

Variables in HTMLText


Reply


4 Posts   960 Views

Avatar
dompie

Community Member, 88 Posts

20 January 2010 at 1:37am

Edited: 20/01/2010 1:38am

i searched the forum and docs but didn't find any satisfying answer.
I have created custom "Details" Tab where i use (among others) a Size field. Now i would like to access the value in the main content wysiwyg by writing $Size. So that the template-engine replaces $Size with the real value (e.g. XXL).

Can this be achieved somehow? I tried $Size, {$Size}, {Details.Size}, <% Details.Size %> and similar but everything failed.

Avatar
zenmonkey

Community Member, 528 Posts

20 January 2010 at 1:37pm

I'm sure I've seen a post on this before, but for the life of me I can't find it

Avatar
SilverRay

Community Member, 167 Posts

20 January 2010 at 2:26pm

Perhaps you mean something like this:

http://doc.silverstripe.org/doku.php?id=recipes:customising-content-in-your-templates

Avatar
MateuszU

Community Member, 89 Posts

20 January 2010 at 2:46pm

I never knew there was a recipe for that :) If you prefer to read the code, userforms does '$Userform' replacement.