Dakor News

You are here: Home >> Blogs

Share this Article

Share

StumbleUpon.com

('DiggThis’)

Delicious Bookmark this on Delicious

Travelling News


Category:Programming
Mar 26, 2009

I want to put a news feature on my website, but I want it to be different. I like the scrolling news idea, but not the ticker type. I have a Javascript that will provide the functionality of the scrolling news but I need to integrate it with the News module of the CMS system. Here is what I needed to do:
  • Create a Javascript file for the scroller functionality
  • Create a new summary template for the News module to use
  • Create a User Defined Tag that calls the Javascript file
  • Modify the News module to display a Javascript array of news items
  • Add a parameter to the News module call to include "summarytemplate='scroller' "
  • Call the UDT on the main template
I created a Javascript file with the current script that I have. The script iterates through an array of news items scrolling through each one. I then modified the News module default page, so that it displays the Javascript array of news items. I created a new Summary Template called scroller. The scroller template only displays the Javascript array of news items. I created a User Defined Tag that calls the Javascript file. I added the UDT to the my main template, right after the News module call. I also added the parameters to the News call so that it would use the 'scroller' template instead of the 'Summary Template' See the finished product on the left.