Hi Guys:
Been trying for a while to do this, and been having problems.
In the CONTENT->PAGES->OPTIONS i want to add in another field called bg_colour which will insert the page bg colour into the template for each page dynamically.
i tried the chat with no luck.
surely cms made simple can allow you to add another field in?? it can't be that difficult, but i'm having problems following the trail as to where everything is done.
can someone please help, its the last part i need to complete to sign off this site.
thanks
Help adding a custom field into the cms
-
Duketown
Re: Help adding a custom field into the cms
Sid3335,
For what I know, CMS Made Simple is stylesheet driven. This means that you set up mulitple stylesheets (one for each background) and connect it to a template (thus you will need multiple templates each for one background color you want). Next to this, you would link per page the correct template. This means you can have one page with background green and the other in blue, simple by changing the template.
This is a little bit of additional setup in the beginning, but far more better, then to update the program that make maintenance and addition of pages possible. Using the stylesheet/template situation will not cause any problems during an upgrade.
Duketown
PS. For those amongst us that have more experience with the stylesheets and I have not been clear enough to Sid3335, please reply (for my learning curve
)
For what I know, CMS Made Simple is stylesheet driven. This means that you set up mulitple stylesheets (one for each background) and connect it to a template (thus you will need multiple templates each for one background color you want). Next to this, you would link per page the correct template. This means you can have one page with background green and the other in blue, simple by changing the template.
This is a little bit of additional setup in the beginning, but far more better, then to update the program that make maintenance and addition of pages possible. Using the stylesheet/template situation will not cause any problems during an upgrade.
Duketown
PS. For those amongst us that have more experience with the stylesheets and I have not been clear enough to Sid3335, please reply (for my learning curve
-
Sid3335
Re: Help adding a custom field into the cms
hi thanks for the reply
not sure the client would want to take these steps each time they want to change a bg color.
surely it can't be overly difficult to add in a new option
not sure the client would want to take these steps each time they want to change a bg color.
surely it can't be overly difficult to add in a new option
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Help adding a custom field into the cms
use a separate content block in your page template like this:
Code: Select all
{literal}<style type='text/css'>
body {
background-color: {/literal}{content block='bgcolor' oneline='true'}{literal}
}
</style>{/literal}
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.
