Limited access to stylesheets

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
Nettie
Forum Members
Forum Members
Posts: 53
Joined: Tue Oct 03, 2006 11:42 pm

Limited access to stylesheets

Post by Nettie »

I'm having a bit of a problem. I have to make a site, where the editor can change color on the sites links, headers and sitename (logo-text), without having access or limited access to the stylesheets.

Is it somehow possible to give the user permission to use only one specific stylesheet?

Or is it possible in some strange way to use a global content block to edit those specific styles?

If anybody has a good solution to this I would higly appreciate it :)
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Limited access to stylesheets

Post by jmcgin51 »

yes, this is certainly possible and I have done it before.  when I get back to a computer, I'll post more specific instructions.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Limited access to stylesheets

Post by jmcgin51 »

here is what I did.  It may not work exactly as-is in your situation, but it should get you started...

1. create a new page template (I called mine "user_editable_css")
- the template looks like this
{process_pagedata}
{content assign="content_var"}
{literal}
    div#content2 {
        background-color:
        {/literal}
            {content block="RightDivBackgroundColor" oneline="true"}
        {literal}
    }
{/literal}
2. create a page (I used page alias = editable-css), and assign it to the template you created above.  This page will be the page that the user edits to change the selected styles (per the content blocks you put in the template).

3. in your regular page template(s), add this between the head tags:
That's it!  Now you can edit the editable-css page, and see your changes immediately on any page that uses the template(s) you modified in step 3.
User avatar
Nettie
Forum Members
Forum Members
Posts: 53
Joined: Tue Oct 03, 2006 11:42 pm

Re: Limited access to stylesheets

Post by Nettie »

THANK YOU SO MUCH!!!!!

That did the trick and was exactly what I was looking for ;D

I owe you big time.........!
User avatar
Nettie
Forum Members
Forum Members
Posts: 53
Joined: Tue Oct 03, 2006 11:42 pm

Re: Limited access to stylesheets

Post by Nettie »

Now i just wonder if there is a way to get rid of the tinymce content area..... ;)
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Limited access to stylesheets

Post by jmcgin51 »

I believe you cannot get rid of the primary content block in current CMSMS versions, as some modules require that block.  In future, I think it will be optional.

You could make it one-line, but that's about as far as you can go, I think...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Limited access to stylesheets

Post by Dr.CSS »

Why not just use the {content} block, give it the label='Right Div Background Color' and online='true'?...
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Limited access to stylesheets

Post by jmcgin51 »

I've never used the "label" attribute - thanks Dr.!
User avatar
Nettie
Forum Members
Forum Members
Posts: 53
Joined: Tue Oct 03, 2006 11:42 pm

Re: Limited access to stylesheets

Post by Nettie »

Just found out it only works in internet explorer :(

Was a great way to give limited access to a stylesheet if it worked. I came up with a solution using global content blocks and combined with CSS as an internal stylesheet in the header. Works the same way except the user has to open a content block for each style setting.

Thanks for the suggestion though - pointed me to a solution.
Post Reply

Return to “Layout and Design (CSS & HTML)”