CGFeedmaker and News module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
virgo
Forum Members
Forum Members
Posts: 27
Joined: Thu May 29, 2008 10:00 am

CGFeedmaker and News module

Post by virgo »

I can no longer create feeds from news module with CGFeedMaker. I even reset template to default and changed
{News assign='junk' detailpage=$feed.pageid}
to
{News assign='junk'}
but $items is unassigned after this.
But junk does contain news content.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGFeedmaker and News module

Post by velden »

I guess scopes 'issue'. Read this carefully: https://www.cmscanbesimple.org/blog/sma ... e-examples
virgo
Forum Members
Forum Members
Posts: 27
Joined: Thu May 29, 2008 10:00 am

Re: CGFeedmaker and News module

Post by virgo »

velden wrote:I guess scopes 'issue'. Read this carefully: https://www.cmscanbesimple.org/blog/sma ... e-examples
I checked them, but none of the examples seemed to be about variables of module. Anyway, I created another News summary template, that generates RSS items and
{News summarytemplate='News_RSS'}
results in in required output.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: CGFeedmaker and News module

Post by Rolf »

Create a News module summary template like describer here
https://www.cmscanbesimple.org/blog/cre ... t-a-module

Call ONLY the News module in CGFeedmaker template pointing to this template.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGFeedmaker and News module

Post by velden »

It is a scope issue for sure; you cannot use the $items variable from the News template anywhere else than inside the News template itself.

This behavior is in the Smarty version used in CMSMS for a while now.

I think the sample template of CGFeedBack CGFeedMaker show how it should be done nowadays.
virgo
Forum Members
Forum Members
Posts: 27
Joined: Thu May 29, 2008 10:00 am

Re: CGFeedmaker and News module

Post by virgo »

Rolf wrote:Create a News module summary template like describer here
https://www.cmscanbesimple.org/blog/cre ... t-a-module
Call the News module in CGFeedmaker template pointing to this template.
That's basically what I ended up doing. News_RSS template contains this foreach part of template.
virgo
Forum Members
Forum Members
Posts: 27
Joined: Thu May 29, 2008 10:00 am

Re: CGFeedmaker and News module

Post by virgo »

velden wrote: I think the sample template of CGFeedBack show how it should be done nowadays.
Not in the default template. At least I don't see it.
Post Reply

Return to “Modules/Add-Ons”