Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Page Controllers
TiruHCL
Hi All,
Please let me know How to create Page Level Controllers.
Where we need to define page Level controllers.
We have a requirement to get the page level Information from all the pages in the site and pass them as a parameter to a JavaScript file.
Regards,
Tiru.
Find more posts tagged with
Comments
Rick Poulin
A page controller is just a method in a Java class that has a specific signature: takes in a RequestContext and returns either null or a ForwardAction. You can do whatever you want in between. If you want to use it at the page level, edit the page and add it via File > Page Properties; though it sounds like you want a site-level controller (to apply to all pages) so you'd want to register it in default.site.
TiruHCL
Hi Poulin,
Thanks for quick reply.
I want define Site-level controller, as suggested I will try make an entry in default.site.
Please suggest are there any other things that need to be taken care to get the changes reflected.
Thanks,
Tiru.
Rick Poulin
That's all you need to do to "activate" it and get LiveSite to start calling your method. The bulk of your work will be in writing the method itself.