Page 1 of 1
Special front-end template for admins?
Posted: Mon Jul 13, 2009 1:17 pm
by Oskar Rough
Hi,
I'd like to test a new template for my site. How do I enable this template for me and only for me?
Re: Special front-end template for admins?
Posted: Mon Jul 13, 2009 2:13 pm
by Coldman
You could make it hard by install FEU etc.....
One easy solution is to create a new page with that new theme and then uncheck
Show in menu:
Then just go to
www.yourdomain.com/NEWPAGE
Re: Special front-end template for admins?
Posted: Mon Jul 13, 2009 6:12 pm
by Oskar Rough
FEU?
Yeah, true that's an option although it's only one page and not the entire site. (This specific site only uses one single template for all pages.)
Re: Special front-end template for admins?
Posted: Tue Jul 14, 2009 1:27 pm
by jmcgin51
you could check the IP address of the visitor, and show them the special template if the IP address matches the IP address of an admin, otherwise show the normal template.
Re: Special front-end template for admins?
Posted: Thu Jul 16, 2009 11:30 pm
by Oskar Rough
jmcgin51 wrote:
you could check the IP address of the visitor, and show them the special template if the IP address matches the IP address of an admin, otherwise show the normal template.
Sounds like a solution

Do you mind starting me with a link or code to change template?
Re: Special front-end template for admins?
Posted: Fri Jul 17, 2009 1:33 am
by jmcgin51
Well, it looks like I shot my mouth off a little early, because you can't do it as easily as I thought you could. I thought you could pass the desired template id in the URL, like "yoursite.com/index.php?page=abc&templateid=42", which would make your job very easy.
But to start off, take a look at this thread:
forum.cmsmadesimple.org/index.php/topic,19028.15.html
specifically Sonya's post about halfway down. If you implement this hack, you should then be able to use some logic at the beginning of the default page template (that everyone else would see), like
{if $page_alias=xyz}
add redirect code to the URL calling the different template, i.e. yoursite.com/index.php?tpl_id=21
{/if}
rest of normal template
UNTESTED, AND REMEMBER THAT HACKS OF THE SOURCE CODE MEAN THAT YOUR SITE IS ESSENTIALLY NOT SUPPORTABLE. Use at your own risk.
forum.cmsmadesimple.org/index.php/topic,28132.0.html
There is probably a better/easier/faster/sexier way to do this...
Re: Special front-end template for admins?
Posted: Fri Jul 17, 2009 4:43 pm
by calguy1000
Oskar wrote:
Hi,
I'd like to test a new template for my site. How do I enable this template for me and only for me?
Why not just:
a) copy a page
b) specify that the new page should use the new template
c) uncheck the 'show in menu' link
d) click submit
e) click the view icon.
You now have a brand new, hidden page to test your new template with.
There are many complexities in dynamically changing the template ID wrt the page id, particularly related to additional content blocks, etc. That would cause many users to become extremely confused if we added this functionality... therefore we allow hidden pages.