Using Themes

6 posts by 3 authors in: Forums > CMS Builder
Last Post: July 10, 2009   (RSS)

By Moonworks - July 9, 2009

I want to create a simple way to use themes. I have figured out part of the way to do it, just need to add a little extra.

What I want to do, is have a pull-down menu with the different theme names, then when one is selected, there will be some code that will tell it where to go.

So, for example, if a theme called Red Sunset was selected, I would have some code that said:

If theme=red sunset then do whatever

That's the general thought anyway.
High quality residential training for writers, actors & Film Making - Click Here for further information

Re: [Moonworks] Using Themes

By isdoo - July 9, 2009

This should be fairly straight forward in theory - simply have a stylesheet for each theme, and have these stylesheets referenced in a table.

However your issue comes when people select their 'theme' - how do you save their preferences without users logging in or cookies being saved on their computer.

So your users would have to select a theme on each page.

Re: [isdoo] Using Themes

By Moonworks - July 9, 2009

I'm thinking more on the admin side. So whatever theme the admin wants to use, they just select, including one for them to edit themselves.
High quality residential training for writers, actors & Film Making - Click Here for further information

Re: [Moonworks] Using Themes

By ross - July 9, 2009

Hi there.

Thanks for the email!

What I would do for something like this is make sure all the files for each theme are in a folder all to themselves.

Then, the drop down you create would have options whose values are the exact same as the folders you created.

That way, on your actual display pages, you can have something like this:

<img src="/themes/<?php echo $record['theme']; ?>/headerImage.jpg">

Does that make sense? Is that close to what you are looking for here? You wouldn't really edit the actual themes through CMS Builder but you could switch the theme on a per page basis. Being able to actually manage the themes in CMS Builder would take a bunch more work.

Let me know what you think :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Using Themes

By Moonworks - July 9, 2009 - edited: July 9, 2009

Hi Ross,

That's kind of what I was thinking.

For example, if I had three themes called Red, Blue & green, I would have apull-down menu with each of them listed, they would then select it, and it would automatically show each bit of the theme from the red, blue or green folder, which would be in a folder called 'themes'.

I weas just hoping there was a way to have the pull-down auto-poulate, so if I added a new theme to that folder, it would read from the folders list, then it could be selected.


The answer I gave here, links in with the one on the other post :

http://www.interactivetools.com/iforum/P72897#72897
High quality residential training for writers, actors &amp; Film Making - Click Here for further information