News Module Reference from User Defined Tag

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
wfunderberg
Forum Members
Forum Members
Posts: 42
Joined: Tue Mar 28, 2006 8:05 pm

News Module Reference from User Defined Tag

Post by wfunderberg »

All,

I am trying to reference the News Module from a User Defined Tag so that I can get a count of active articles from a particular category to determine if I should display a predefined message.

I have searched through countless post but non have really shown this method that I am trying to achieve.

Is it possible to do this and if so any inspirational code would be most helpful!

Thanks!
Wes
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: News Module Reference from User Defined Tag

Post by Wishbone »

Instead of a UDT, why don't you create a summary template for this.. There might be a smarty variable that has the count.. if it doesn't you can just count it. ;) The summary template won't output anything, (unless you want it to)
wfunderberg
Forum Members
Forum Members
Posts: 42
Joined: Tue Mar 28, 2006 8:05 pm

Re: News Module Reference from User Defined Tag

Post by wfunderberg »

Thank you for the suggestion and I will try that to see if it will do what I want it to.
wfunderberg
Forum Members
Forum Members
Posts: 42
Joined: Tue Mar 28, 2006 8:05 pm

Re: News Module Reference from User Defined Tag

Post by wfunderberg »

Thank you Wishbone, that did the trick and was quite easy to implement.
Post Reply

Return to “Developers Discussion”