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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

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

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

getting custom module to work

Go to End

3 Posts   1202 Views


Community Member, 89 Posts

19 November 2008 at 11:36am

Edited: 19/11/2008 11:38am


i wrote a module, that adds a flash file to the page using swfobject.js.
now i have a tab in the cms, where i can fill the required data. in the module folder, i also have a template file, like:

    swfobject($FlashUrl, $Container, $Width, $Height);

$FlashUrl, $Container etz. are the variables i enter in cms.

how do i get this code snippet into my page, filled with the variables from the tab?

thanks a lot!


126 Posts

19 November 2008 at 3:01pm


did you add the database fields to the module code? E.g.

static $db = array(
		"FlashUrl" => "Text",
		"Container" => "Varchar(255)",
		"Width" => "Int",
		"Height" => "Int"

If you have that and you added the CMS fields the variables should be available in your template file as in your code snippet.



Community Member, 89 Posts

19 November 2008 at 9:17pm

Edited: 19/11/2008 10:57pm

hi anatol,

thanks for the answer... but i'm trying to do it modular, so nobody has to edit the page types...

just like a widget, when you just type: $Sidebar, and the code is "just there".

any idea on that? - if it's possible anyway...