ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Testing for Template Group in an Entry?

April 09, 2012 5:48pm

Subscribe [1]
  • #1 / Apr 09, 2012 5:48pm

    willmyddelton

    1 posts

    I’m using the Pages module to specify both a Pages URI and a Template for each Entry. When the named Pages URI is entered in the browser, this triggers the specified Template to load with that Entry’s data.

    But is there a way to test what Template Group the Entry belongs to? Or more precisely, what Template Group the Template that the Entry calls via the Pages module belongs to?

    Something like {if template_group == "about"}xxxx{/if}

    Pre-Pages module I would do this by using {segment_1} as it matches the template group…but that’s not true when you’ve created your own Pages URI. (My Template Groups match my global nav, so I’m using this to highlight the selected nav element).

    Cheers!

    Will

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases