cotonti.com : Page-specific tpl? https://www.cotonti.com Laatste forum onderwerpen Cotonti en Tue, 03 Mar 2026 21:02:54 -0000 Hodges Works perfectly. Thanks guys for the swift replies!

]]>
Thu, 03 Apr 2014 13:46:53 -0000
Kort That should be:

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

not

{PHP.page.id}

 

]]>
Thu, 03 Apr 2014 12:39:19 -0000
Twiebie #39366 Hodges:

*bump*

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:

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

Help! :)

Added 1 hours later:

Also how can I combine this with an if statement to check to see if the user is an admin?

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

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

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

Here is some good documentation:

http://www.cotonti.com/docs/ext/themes/cotemplate_debug_mode
http://www.cotonti.com/docs/ext/themes/cotemplate_statements

]]>
Thu, 03 Apr 2014 12:31:32 -0000
foxhound Maybe this plugin (last post) will be easier to use?

http://www.cotonti.com/forums?m=posts&q=6586&n=unread#unread

]]>
Thu, 03 Apr 2014 11:49:37 -0000
Hodges *bump*

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:

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

Help! :)

Added 1 hours later:

Also how can I combine this with an if statement to check to see if the user is an admin?

]]>
Thu, 03 Apr 2014 09:53:26 -0000
tensh Ma, 15 Jun 2009 19:46:55 -0000 Kort Ma, 15 Jun 2009 18:15:46 -0000 tensh Ma, 15 Jun 2009 17:38:37 -0000 Kilandor Ma, 15 Jun 2009 17:02:15 -0000 tensh
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)?]]>
Ma, 15 Jun 2009 15:50:22 -0000