<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Page-specific tpl?</title>
		<link>https://www.cotonti.com</link>
		<description>Last topic posts</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Wed, 08 Apr 2026 17:02:53 -0000</pubDate>

		<item>
			<title>Hodges</title>
			<description><![CDATA[<p>Works perfectly. Thanks guys for the swift replies!</p>
]]></description>
			<pubDate>Thu, 03 Apr 2014 13:46:53 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2861&d=0#post39371]]></link>
		</item>
		<item>
			<title>Kort</title>
			<description><![CDATA[<p>That should be:</p>

<pre class="brush:as3;">
&lt;!-- IF {PHP.pag.page_id} == 22 AND {PHP.usr.isadmin} --&gt;
&lt;span style="display:block; float:right"&gt;&lt;a href="https://www.cotonti.com/{PHP|cot_url('page','c=members&amp;m=add')}"&gt;Submit new member&lt;/a&gt;&lt;/span&gt;
&lt;!-- ENDIF --&gt;</pre>

<p>not</p>

<pre class="brush:as3;">
{PHP.page.id}</pre>

<p> </p>
]]></description>
			<pubDate>Thu, 03 Apr 2014 12:39:19 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2861&d=0#post39369]]></link>
		</item>
		<item>
			<title>Twiebie</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums?m=posts&amp;q=2861&amp;d=1#39366">#39366</a> <strong>Hodges: </strong>
<p>*bump*</p>

<p>I've tried to implement what Kort has suggested, but I obviously don't know what variables are available in this context. This is my attempt:</p>

<pre class="brush:xml;">
	&lt;!-- IF {PHP.page.id} == 22 --&gt;
	&lt;span style="float:right"&gt;&lt;a href="https://www.cotonti.com/index.php?e=page&amp;m=add&amp;c=members"&gt;Submit new member&lt;/a&gt;&lt;/span&gt;
	&lt;!-- ENDIF --&gt;</pre>

<p>Help! :)</p>

<p><strong>Added 1 hours later:</strong></p>

<p>Also how can I combine this with an if statement to check to see if the user is an admin?</p>
</blockquote>

<p>You can do {PHP|dump} in the template to get all the available variables. Make sure debug mode is enabled though.</p>

<p>For your specific statement you could do something like this to check if the user is an admin:</p>

<pre class="brush:xml;">
&lt;!-- IF {PHP.pag.page.id} == 22 AND {PHP.usr.isadmin} --&gt;
&lt;span style="float:right"&gt;&lt;a href="https://www.cotonti.com/index.php?e=page&amp;m=add&amp;c=members"&gt;Submit new member&lt;/a&gt;&lt;/span&gt;
&lt;!-- ENDIF --&gt;</pre>

<p>Here is some good documentation:</p>

<p><a href="http://www.cotonti.com/docs/ext/themes/cotemplate_debug_mode">http://www.cotonti.com/docs/ext/themes/cotemplate_debug_mode</a><br /><a href="http://www.cotonti.com/docs/ext/themes/cotemplate_statements"><span style="line-height:1.6em;">http://www.cotonti.com/docs/ext/themes/cotemplate_statements</span></a></p>
]]></description>
			<pubDate>Thu, 03 Apr 2014 12:31:32 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2861&d=0#post39368]]></link>
		</item>
		<item>
			<title>foxhound</title>
			<description><![CDATA[<p>Maybe this plugin (last post) will be easier to use?</p>

<p>http://www.cotonti.com/forums?m=posts&amp;q=6586&amp;n=unread#unread</p>
]]></description>
			<pubDate>Thu, 03 Apr 2014 11:49:37 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2861&d=0#post39367]]></link>
		</item>
		<item>
			<title>Hodges</title>
			<description><![CDATA[<p>*bump*</p>

<p>I've tried to implement what Kort has suggested, but I obviously don't know what variables are available in this context. This is my attempt:</p>

<pre class="brush:xml;">
	&lt;!-- IF {PHP.page.id} == 22 --&gt;
	&lt;span style="float:right"&gt;&lt;a href="https://www.cotonti.com/index.php?e=page&amp;m=add&amp;c=members"&gt;Submit new member&lt;/a&gt;&lt;/span&gt;
	&lt;!-- ENDIF --&gt;</pre>

<p>Help! :)</p>
<p><strong>Added 1 hours later:</strong></p><p>Also how can I combine this with an if statement to check to see if the user is an admin?</p>
]]></description>
			<pubDate>Thu, 03 Apr 2014 09:53:26 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2861&d=0#post39366]]></link>
		</item>
		<item>
			<title>tensh</title>
			<description><![CDATA[Yes... but how would you use the IF block to achieve what I want? Hmm... &quot;if page id=XX&quot;? Then the page.tpl would grow quite big in case of multiple custom pages, and would not be easy to read. :) But yes, thanks for pointing that, it might be a fast solution for little custom pages.]]></description>
			<pubDate>Mon, 15 Jun 2009 19:46:55 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2861&d=0#post13239]]></link>
		</item>
		<item>
			<title>Kort</title>
			<description><![CDATA[You might want to use trunk version of xtemplate.class.php to enable IF-blocks in templates]]></description>
			<pubDate>Mon, 15 Jun 2009 18:15:46 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2861&d=0#post13236]]></link>
		</item>
		<item>
			<title>tensh</title>
			<description><![CDATA[Thanks for reply, I'll check the possibilities.]]></description>
			<pubDate>Mon, 15 Jun 2009 17:38:37 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2861&d=0#post13234]]></link>
		</item>
		<item>
			<title>Kilandor</title>
			<description><![CDATA[Sorry but no the core has no such feature but you could core hack it pretty simply]]></description>
			<pubDate>Mon, 15 Jun 2009 17:02:15 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2861&d=0#post13233]]></link>
		</item>
		<item>
			<title>tensh</title>
			<description><![CDATA[Hi;<br />
<br />
Is there a possibility to make a specific page use given TPL for a display, such as it is the case with categories (list.tpl)?]]></description>
			<pubDate>Mon, 15 Jun 2009 15:50:22 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2861&d=0#post13232]]></link>
		</item>
	</channel>
</rss>