[SOLVED]Help detect News Detail template on content page

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
blackhawk
Power Poster
Power Poster
Posts: 280
Joined: Mon Oct 20, 2008 6:07 pm

[SOLVED]Help detect News Detail template on content page

Post by blackhawk »

I am using CMSMS 1.11.4

I currently have a {news} tag set on my content home page, which also has content on there.

When My user clicks to read more, it appears that the detailed template for news (along with the detailed content), loads into the home page, which is fine. But is there a conditional statement I can place on my home page that does the following...

if news details exist...
hide the default home page content
else
show home page default content


I know I can do this with jquery (classes and Id's), but I was curious if there was a smarty way for me to do this in the cmsms system.

thanks!
Last edited by blackhawk on Mon Sep 15, 2014 12:33 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Conditional statement to help detect News Detail templat

Post by Dr.CSS »

Using the default action of News will make it take over all the content in the default {content} area, if you have more than one {content} box, such as {content block='second-content'}, your second box will still appear...

Too asnwer your question, no there isn't...
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Conditional statement to help detect News Detail templat

Post by velden »

I think there is, but maybe it's getting more complicated than needed.
Why don't you just add a new page with same template as homepage. Then configurate News module to show details on that specific page. Hide that page from the menu.
blackhawk
Power Poster
Power Poster
Posts: 280
Joined: Mon Oct 20, 2008 6:07 pm

Re: Conditional statement to help detect News Detail templat

Post by blackhawk »

Velden, that is the solution I need! thank you so much for helping me think this through...
Post Reply

Return to “Modules/Add-Ons”