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.

Template Questions /

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

DB Field as inline Style format


Go to End


3 Posts   1790 Views

Avatar
atadxart

Community Member, 3 Posts

19 June 2009 at 5:16pm

Hi,

i've tried hard to get this work - but i'm now stuck maybe somone can help.

I wannt to have a Field in der cms for a specific page type - ok thats easy

this field should be used to get a color value into the template - the editor shoud be able to edit this color

it is possible - i've done that to show this value outside from a html tag but inside it won't show

<li class="$LinkingMode" style="border-bottom:1px solid #$Color;"> $Color <a href="$Link".............
the first one won't show ^^^^^^^
^^^^^ this one is shown

can anyone explain why this works not the way i want?

thx

Avatar
SilverRay

Community Member, 167 Posts

19 June 2009 at 7:31pm

Try "border-bottom:1px solid #{$Color};"

Avatar
atadxart

Community Member, 3 Posts

20 June 2009 at 2:10am

thx much

with {} it works perfect as i want

greets from austria