Using the "$entry" tags in News module

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
tonyg

Using the "$entry" tags in News module

Post 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
cyberman

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

Post by cyberman »

Have you tried to call an external template with content of detail template inside?
tonyg

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

Post 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
cyberman

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

Post by cyberman »

Hmm, another way could be to copy the content from detail template to summary template ...
tonyg

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

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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.
Last edited by Anonymous on Thu Sep 14, 2006 12:08 pm, edited 1 time in total.
tonyg

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

Post 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
Locked

Return to “Layout and Design (CSS & HTML)”