Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Snippet module

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1138 Views
  • masson
    Avatar
    Community Member
    8 Posts

    Snippet module Link to this post

    hey guys,

    Just a quick question, is there any snippet module in the Silverstripe CMS?. What i mean is that i need to be able to control text all over the layout, such as the copyright notice etc.

    Anyone using some method it would like to share, or is this even available already?..

    Thank you...

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: Snippet module Link to this post

    You can easily do this without a module, just make some extra dbfields, make a cmsfield for it, and use the variable in the template. so something like

    static $db = array(

    "FooterText " => "Text"
    );

    and in the getCMSFields method:

    $fields->addFieldToTab("Root.Content.Footer", new TextareaField("FooterText", "Set your FooterText here", 4));

    you can then use the $FooterText variable in your template.

  • masson
    Avatar
    Community Member
    8 Posts

    Re: Snippet module Link to this post

    Hey,

    Thanks!. I appreciate your help. I was wondering if you can explain this just a little bit better?. I would really appreciate it...

    Thanks again.

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