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.

Archive /

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

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

Snippet module


Go to End


3 Posts   1570 Views

Avatar
masson

Community Member, 8 Posts

30 May 2008 at 3:01am

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

Avatar
dio5

Community Member, 501 Posts

30 May 2008 at 3:24am

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.

Avatar
masson

Community Member, 8 Posts

2 June 2008 at 11:17pm

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.