Padding and repeat tags using attributes
Permalink
Is there any way at all to give the user the ability to change background images on their site and then adjust the padding, height, width, margin, padding etc.. (like they can now on the design page) for the whole site?
I think the one thing that is either missing or that I'm not familiar with is to give the user the ability to change the styling of not just one container but the styling for the whole website. (unless I'm just missing something which is entirely possible).
I'd just like to know that this is NOT possible before spending money to have someone build this for me.
Thanks..
I think the one thing that is either missing or that I'm not familiar with is to give the user the ability to change the styling of not just one container but the styling for the whole website. (unless I'm just missing something which is entirely possible).
I'd just like to know that this is NOT possible before spending money to have someone build this for me.
Thanks..
I've done all of that for colors.. but what about background images? Will it work for that?
not currently. but you can set those up as page attributes. Create an attribute called say "page_background" then in your template add something like this:
there's a few ways other then this to do it but it is all the same principle.
<?php if($c->getAttribute('page_background')){ $bgStyle = "background-image:url(".$c->getAttribute('page_background')->getURL().");"; } ?> </head> <body style="<?=$bgStyle;?>">
there's a few ways other then this to do it but it is all the same principle.
Yes.. I figured that out.. but there's no way for them to adjust height, width, repeat, padding, etc.. correct?
sure just set up a couple other page attributes, like "page_background_repeat" and set it up as a select with the options for background-repeat. then alter the code above to write out the proper definitions.
or better yet would be to create a whole new attribute type which when selected supplies all the fields in one attribute.
http://www.concrete5.org/documentation/how-tos/developers/create-a-...
or better yet would be to create a whole new attribute type which when selected supplies all the fields in one attribute.
http://www.concrete5.org/documentation/how-tos/developers/create-a-...
That's awesome.. but how do I set up one attribute with multiple criterias? I just added an image/file attribute for the navigation background.. then I clicked on the add attribute button above it and added an attribute for repeat-x, repeat-y, and no-repeat.. But it set up two different attributes. I'm not seeing where I can set up one attribute with all of these settings?
To do this, you would have to create your own attribute that contains multiple fields. See:
http://www.concrete5.org/documentation/developers/attributes/overvi...
http://www.concrete5.org/documentation/developers/attributes/overvi...
or
that sets up a style for customization from within the dashboard. simply add a few of those special comments in your theme.
then go to the themes page in the dashboard, and for the theme you are working with click on the customize button. This will give you control over your styles.
As far as i know this will only work with certain styles and you may have trouble if the style definition is a short cut.