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.

Customising the CMS

Assign Advertisements in to selected pages


3 Posts   920 Views


18 February 2010 at 1:09am Community Member, 8 Posts

Hi All,

I have developed one module (Advertisement) near to Site Content tab. In the Advertisement section i can add different types of ads and it will listed at the left side menu too. So which means, i have completed the Add/Edit/Delete functionality of the Advertisement section.
Now What i need is, I have to assign each ads in to selected pages ( Site-tree ). Since i am Newbie to this Silverstripe I don't have enough idea to How can i implement the Ad assign to the pages section. I have tired many ways but i can't implement that section.

What i need is after adding the ad I have to assign that particular ad in to the pages (site-tree). If a site tree shown in a popup with check box and check the needed page and save that change . This is what i need.

Please help me for developing this module. Any help would be much appreciated....



18 February 2010 at 3:09am Community Member, 323 Posts

Hi Arun!

You don’t explain the ‘many ways’ you tried to do it and what issues did you found, but assuming that your Advertisement module is rather a Page or a DataObject, you’ll have to create a relationship between ads and pages. It’s quite easy: just follow [url=]the tutorial[/url].

Hope it helps.


18 February 2010 at 3:47am Community Member, 8 Posts

Hi Juan,

Thanks very much for your quick reply. I will go through the link that you have sent to me.

Thanks and Regards,