Test for Content type on Page template

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
webform
Power Poster
Power Poster
Posts: 503
Joined: Sat Nov 25, 2006 3:39 pm
Location: Copenhagen, Denmark

Test for Content type on Page template

Post by webform »

I try to reduce the number of templates the end user should select from when creating a new page. What i want to do is test what content type the page is, so i can load different stylesheets  or template elements depending on page content type.

How do i test for what content type a page is set to in my template (if possible)?

I've tried something like this to no avail:

Code: Select all

{if $content-type == catalogitem}
Something here
{/if}
I've tried to use get_template_vars, but it doesnt seem to call content type.

Thanks

Finn
smokeycam
New Member
New Member
Posts: 6
Joined: Mon Mar 10, 2008 9:26 pm

Re: Test for Content type on Page template

Post by smokeycam »

Bump, would be very useful
Post Reply

Return to “CMSMS Core”