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

widget framework

Go to End

2 Posts   1757 Views

Decisive Flow

Community Member, 73 Posts

23 May 2007 at 9:01am

I've just been updating the PlanHQ site, to which we've added bits like tag clouds etc. So far we've been adding them into the php file of the template which means a lot of duplication. Is silverstripe planning some sort of widget framework? Ie. a default folder called 'widgets' that holds the php include files for extra widgety type code people write?

Most other CMS's have this sort of thing and it works well for us. It also means things like tag clouds become somewhat standard which is nice. :)


Administrator, 690 Posts

23 May 2007 at 10:52am

It's a good idea, Natalie...

If we had a method called Widget on ViewableData, that instanciated the classname given in the argument, you could then put something like this into your code:


Or you could render the TagCloud object using custom HTML, if the widget was set up for it:

<% control Widget(TagCloud) %>
<li class="size$Size"><a href="$Link">$Tag</a></li>
<% end_control %>

To make a TagCloud, you'd need to have some kind of TemplateWidget API. Natalie, what was the code that you used to make your tag cloud?