Jump to:

23368 Posts in 18143 Topics by 2863 members

General Questions

SilverStripe Forums » General Questions » How to use editor in the Navigation label?

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: 1098 Views
  • Uzenmi
    Avatar
    Community Member
    19 Posts

    How to use editor in the Navigation label? Link to this post

    Hello,

    I downloaded your software and run it to my site for a year ago. Now I have a small change and need to you help. Can you please show me how to use editor in the "Navigation label" like the "Content", its mean I can use font-size, font-color... in the "Navigation label" like the "Content"?

    Thank you very much.

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: How to use editor in the Navigation label? Link to this post

    you can remove the field and the replace it again with another HTMLEditor field.

    with one of the following functions,

    $this->fields->removeByName('MyFieldName');

    $this->fields->removeFieldFromTab('TabName', 'MyFieldName');

    and then you can add a HTMLEditorFiled

    with the following function,

    $fields->addFieldToTab('Root.Content.Main', new DropdownField('PageColor', 'Page Color', self::$colors), $this->PageColor);

    read this for more http://doc.silverstripe.com/doku.php?id=Form

  • Uzenmi
    Avatar
    Community Member
    19 Posts

    Re: How to use editor in the Navigation label? Link to this post

    Thanks very much,

    And can you please show me how to insert space "   " in to the "Navigation label" ?

    Thanks again,

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