Page 1 of 1

Using the "$entry" tags in News module

Posted: Fri Sep 08, 2006 8:19 am
by tonyg
I have restarted this support question because I think the original question was really misunderstood. I hope I can make it clearer this time and get an answer.

In the News module Summary Template, there are two $entry values - "$entry->summary" and "$entry->content" - in an if/then statement with format tags.

What do I need to add to the CMS module tag to cause "$entry->content" to be true so that the template code in that statement is actioned by the script?

I tried:

Code: Select all

{cms_module module='news' detailpage='latest_news' showdetail='true' content='true'}
But that does not seem to do anything. It is still displaying from the "summary" section of the statement.

Thanks for the help. Great product.

Tony Gilbert
Brisbane, Australia

Re: Using the "$entry" tags in News module

Posted: Tue Sep 12, 2006 1:46 pm
by cyberman
Have you tried to call an external template with content of detail template inside?

Re: Using the "$entry" tags in News module

Posted: Wed Sep 13, 2006 6:57 am
by tonyg
cyberman wrote: Have you tried to call an external template with content of detail template inside?
Yes, but all I get is the summary template. The only time I see the detail template is when I click on a summary news link.

I have got it working in a sense. I have added an extra parameter with an "if" statement in the summary template, which displayed $entry>content if enabled instead of $entry>summary. This gives me a list of detail news items (which someone else in this forum said could not be done).

However, I'd still like to understand how to activate the $entry parameters directly.

Tony

Re: Using the "$entry" tags in News module

Posted: Wed Sep 13, 2006 7:53 am
by cyberman
Hmm, another way could be to copy the content from detail template to summary template ...

Re: Using the "$entry" tags in News module

Posted: Thu Sep 14, 2006 7:45 am
by tonyg
cyberman wrote: Hmm, another way could be to copy the content from detail template to summary template ...
Yes, but you don't really need to do that, do you? Take a look at http://www.mraqld.org/cms/latest_news and you will see that detail news can be presented from the summary template. The same (summary) template is deliving news summaries on the home page and news detail on the latest news page. That's not the problem (any more).

I just need to understand (to satisfy my own morbid sense of curiosity) why there are $entry tags but no documentation for them and nothing seems to cause them to be activated. I am beginning to think no-one else knows either.

Tony

Re: Using the "$entry" tags in News module

Posted: Thu Sep 14, 2006 12:06 pm
by Dr.CSS
The News defaults to Summary first so if you want to display the Detail style content instead then you need to make your own template and call it as a summary template...

{cms_module module='news' detailpage='latest_news' summarytemplate='detailtemplateyoumade.tpl'} the .tpl needs to be on the end
this template needs to be in your modules/news/templates folder...

Calling  showdetail='true' and  content='true' in the tag will do nothing, the $entry->content calls are used in templates only, the smarty system uses them to proccess the the news items and you use them in templates to get what you want to show on the page, they can be moved around in the template to get them where you like them, then the template gets called in the news tag, if you don't call a template in your tag then you get the default actions of the news module.

Re: Using the "$entry" tags in News module

Posted: Thu Sep 14, 2006 11:44 pm
by tonyg
mark wrote: The News defaults to Summary first so if you want to display the Detail style content instead then you need to make your own template and call it as a summary template...

{cms_module module='news' detailpage='latest_news' summarytemplate='detailtemplateyoumade.tpl'} the .tpl needs to be on the end
this template needs to be in your modules/news/templates folder...

Calling  showdetail='true' and  content='true' in the tag will do nothing, the $entry->content calls are used in templates only, the smarty system uses them to proccess the the news items and you use them in templates to get what you want to show on the page, they can be moved around in the template to get them where you like them, then the template gets called in the news tag, if you don't call a template in your tag then you get the default actions of the news module.
OK, thanks for that. I understand now.

Tony