how do I put a template chooser on my site?
how do I put a template chooser on my site?
I want to set up a template chooser. I tried a search for topics and modules on this and I could only find a stylesheet chooser, not a template chooser.
I want to set up separate templates so that I can design different layouts for the user to choose from. Anybody know how to do this?
I am running CMSMS 0.13.
I want to set up separate templates so that I can design different layouts for the user to choose from. Anybody know how to do this?
I am running CMSMS 0.13.
Re: how do I put a template chooser on my site?
You will have to go to Dynamic Drive .com to find a JS script to use, not tested it but would like one myself.
I couldn't figure out how to change stylesheet switcher in to template switcher.
I couldn't figure out how to change stylesheet switcher in to template switcher.
Re: how do I put a template chooser on my site?
Looks like the CMSMS community has another module that needs to be developed. 
I'll check around for a script. Thanks.

I'll check around for a script. Thanks.
- Elijah Lofgren
- Power Poster
- Posts: 811
- Joined: Mon Apr 24, 2006 1:01 am
Re: how do I put a template chooser on my site?
To be able to choose the template id via a URL variable you could:zeroality wrote: I want to set up a template chooser. I tried a search for topics and modules on this and I could only find a stylesheet chooser, not a template chooser.
I want to set up separate templates so that I can design different layouts for the user to choose from. Anybody know how to do this?
I am running CMSMS 0.13.
1. Open index.php and find this line:
Code: Select all
$pageinfo = PageInfoOperations::LoadPageInfoByContentAlias($page);
Code: Select all
if (FALSE == empty($_GET['template_id']))
{
$pageinfo->template_id = $_GET['template_id'];
}
Should get you started.
Hope this help,
Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. 

Re: how do I put a template chooser on my site?
So I could use this in my index.php on line 183 and it wont mess it up?
And then find the stylesheet call in stylesheet switcher and replace it with ?template_id=, wonder if there is some way to get it pointed at the template db like it does for CSS to put in it's drop down?
hhmmmm....
And then find the stylesheet call in stylesheet switcher and replace it with ?template_id=, wonder if there is some way to get it pointed at the template db like it does for CSS to put in it's drop down?
hhmmmm....
Re: how do I put a template chooser on my site?
I'm not a PHP guru but I am definitely interested in this. Could someone finish the code above and tell us dummies how it's done? 

Re: how do I put a template chooser on my site?
Well, I suppose this is how threads go at CMSMS. Somebody gets you excited about something but doesn't follow up. 
Edit: I don't mean to sound bitchy. "Oh, he didn't get his problem solved so now he's whining." No, this isn't just "my" problem. I can only imagine how many people using CMSMS would love a template switcher so I don't understand why someone can't take time to help probably 25% of the CMSMS customer base. =\

Edit: I don't mean to sound bitchy. "Oh, he didn't get his problem solved so now he's whining." No, this isn't just "my" problem. I can only imagine how many people using CMSMS would love a template switcher so I don't understand why someone can't take time to help probably 25% of the CMSMS customer base. =\
Last edited by zeroality on Tue Aug 22, 2006 9:04 pm, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: how do I put a template chooser on my site?
Are you talkking 'stylseheet switching', or 'template switching'.
TemplateManager as of now allows you to specify prefererred, and alternate stylesheets....
Template manager would infer allowing users to specify completely different layouts for their pages.
CMS Doesn't support this at this time.
You couold have different numbers of content blocks on each template? what if one or more weren't fillde out?
TemplateManager as of now allows you to specify prefererred, and alternate stylesheets....
Template manager would infer allowing users to specify completely different layouts for their pages.
CMS Doesn't support this at this time.
You couold have different numbers of content blocks on each template? what if one or more weren't fillde out?
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.
Re: how do I put a template chooser on my site?
Your attitude toward Elijah and the rest of the community is upsetting. No one is obligated to help you.
My answer would have been:
simply use divs appropriately. Then, use the stylesheet switcher.
Think I'm crazy?
csszengarden.com
The whole point is that STRUCTURE (html) should be the same. CSS is where you change things.
Personally, I'm trying to come up with one layout that will work for every site I do. Then I have my css files, and just modify one of them.
My answer would have been:
simply use divs appropriately. Then, use the stylesheet switcher.
Think I'm crazy?
csszengarden.com
The whole point is that STRUCTURE (html) should be the same. CSS is where you change things.
Personally, I'm trying to come up with one layout that will work for every site I do. Then I have my css files, and just modify one of them.
Re: how do I put a template chooser on my site?
I agree with streever, an I use this technique myself; your site must be valid, and must use css for layout (well, at least thats my point of view).My answer would have been:
simply use divs appropriately. Then, use the stylesheet switcher.
But there is a drawback on the styleswitcher: lets say, you want to deliver a different DOCTYPE (e.g. XHTML Basic for handheld users). Or you need to send a different IE-Stylesheet, enclosed in a conditional comment. Or you want to use different JavaScript (for instant, if you use JS to compansate IE incapabilities).
For that a templateswitcher would be quite usefull.