Page 1 of 1

Test for Content type on Page template

Posted: Mon Sep 14, 2009 12:53 pm
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

Re: Test for Content type on Page template

Posted: Tue Sep 15, 2009 5:03 am
by smokeycam
Bump, would be very useful