Hi,
I'd like to test a new template for my site. How do I enable this template for me and only for me?
Special front-end template for admins?
- Oskar Rough
- Forum Members
- Posts: 40
- Joined: Tue Aug 26, 2008 9:45 pm
- Location: Denmark
Re: Special front-end template for admins?
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
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
Important Code of Conduct
Why don't use CMSMS Docs or search?
Do you read Help?
Admin for Swedish Translations Team
Moderator Swedish Forum
After your problem is solved, push the green button
Why don't use CMSMS Docs or search?
Do you read Help?
Admin for Swedish Translations Team
Moderator Swedish Forum
After your problem is solved, push the green button
- Oskar Rough
- Forum Members
- Posts: 40
- Joined: Tue Aug 26, 2008 9:45 pm
- Location: Denmark
Re: Special front-end template for admins?
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.)
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?
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.
- Oskar Rough
- Forum Members
- Posts: 40
- Joined: Tue Aug 26, 2008 9:45 pm
- Location: Denmark
Re: Special front-end template for admins?
Sounds like a solutionjmcgin51 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.

Re: Special front-end template for admins?
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...
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...
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Special front-end template for admins?
Why not just: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?
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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.