• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to tell what type of page? category, thread, etc.


New member
i want to know what type of page is being served.

reason: i want to serve different content in the <head> depending on if the page is a category or a thread. basically i want the format of the title tag and also the description tag to be different depending on the type of page.

i tried

<xen:if is="{$forum.node_id}">
<title>This is a forum node</title>
<xen:else />
<title>this is a thread or other page</title>

but that is clearly wrong.

additionally, if i'm on a thread page, what variable will tell me what the title of the forum that thread is in?


New member
ok i've developed this further:

<xen:if is="{$contentTemplate} == 'forum_list'">
<meta name="description" content="my content here" />
<xen:elseif is="{$contentTemplate} == 'forum_view'" />
<title>{xen:raw $title}</title>
<meta name="description" content="{xen:raw $pageDescription.content}" />
<xen:elseif is="{$contentTemplate} == 'thread_view'" />
<title>{xen:raw $title}, at example.com</title>
<xen:else />
<title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>

the above all works fine, but i need to get the name of the forum that a thread is in.
what variable do i need to use to get that.

furthermore where can i find out what all possible values in the $head array could be -
i've added {xen:helper dump, $head} to the bottom of the PAGE_CONTAINER template, but when calling any particular page only the keys which are set are displayed, not what keys could potentially be set.
eg. on the forums page it shows: canonical, description and openGraph
on an individual forum node page it shows: canonical and rss
where do i find what all the potential keys are?