Jump to:

3432 Posts in 1025 Topics by 865 members

Template Questions

SilverStripe Forums » Template Questions » DB Field as inline Style format

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

Page: 1
Go to End
Author Topic: 1103 Views
  • atadxart
    Avatar
    Community Member
    3 Posts

    DB Field as inline Style format Link to this post

    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

  • SilverRay
    Avatar
    Community Member
    167 Posts

    Re: DB Field as inline Style format Link to this post

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

  • atadxart
    Avatar
    Community Member
    3 Posts

    Re: DB Field as inline Style format Link to this post

    thx much

    with {} it works perfect as i want

    greets from austria

    1103 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.