Changing css with php
2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 16, 2010 (RSS)
By JeffC - August 16, 2010
Does anyone have any experience of using php to alter css (or can anyone point me in the right direction of some good tutorials)
It would be a very useful addition if a user was able to make simple css changes within the cmsb environment. I'm not thinking of anything too complicated at this stage - just the ability to change change the colour of the h1 tag for example - though I am sure things will get more adventurous as things develop.
I don't have an actual project that needs this, I just had a bit of downtime and got thinking about what I could do with cmsb next. If anyone wants to work with me on this get in touch.
It would be a very useful addition if a user was able to make simple css changes within the cmsb environment. I'm not thinking of anything too complicated at this stage - just the ability to change change the colour of the h1 tag for example - though I am sure things will get more adventurous as things develop.
I don't have an actual project that needs this, I just had a bit of downtime and got thinking about what I could do with cmsb next. If anyone wants to work with me on this get in touch.
Jeff
Re: [Jeffncou] Changing css with php
By Jason - August 16, 2010
Hi,
From the sounds of it, you would have a section in CMS Builder where you would create CSS rules. On any given page, you can access these in one of two ways.
One, you could select all of the rules from the database and then output them in the <head> section between <style> tags.
The other option would be to create a script that would write a .css file and then link that file onto your pages. You can then create a link inside CMS Builder that would run your script. Here is another post from another user trying the same thing:
http://www.interactivetools.com/forum/gforum.cgi?post=82129#82129
Hope this helps get you started.
From the sounds of it, you would have a section in CMS Builder where you would create CSS rules. On any given page, you can access these in one of two ways.
One, you could select all of the rules from the database and then output them in the <head> section between <style> tags.
The other option would be to create a script that would write a .css file and then link that file onto your pages. You can then create a link inside CMS Builder that would run your script. Here is another post from another user trying the same thing:
http://www.interactivetools.com/forum/gforum.cgi?post=82129#82129
Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/