• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [SOLVED] Cannot edit CSS that is embedded in content
PostPosted: Wed Jul 18, 2012 5:37 pm 
Offline
New Member

Joined: Wed Jul 18, 2012 3:35 pm
Posts: 3
I've been using CMSms for all of a day, and have the job of moving a small web site to it, from free standing pages (using Smarty). I have created a template, along with its CSS, that seems to perform quite well and matches what we see on the existing pages. My problem lies with the content of my first page (our home page). The content appears, more or less as it should, but the CSS doesn't behave as expected. I'm happy to take the blame for that, at least for the time being, but how can I edit the CSS, which is embedded in the content as a large chunk of
Code:
{literal}<style>...</style>{/literal}
code? All I see in the content editor is
Code:
{literal}{/literal}
- no <style>.

A further question arising out of this, is, whether or not CMSms injects any of its own CSS into the template expansion, or can I rely on the only CMS being present, coming from my template and my content? If there is any additional CSS, can I suppress it?

For the avoidance of doubt, I have v1.10.3 installed

Thanks in anticipation,
Oswy


Last edited by Oswy on Thu Jul 19, 2012 1:58 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Cannot edit CSS that is embedded in content
PostPosted: Wed Jul 18, 2012 5:53 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 6576
Location: Fernie British Columbia, Canada
1. I suggest you read the default content pages that come with CMSMS. They explain a great deal of how CMSMS works with pages and content and styles.

2. styles should NEVER be embedded into content areas. You need to understand the concept of separation of design and content.

3. WYSIWYG editors are not text editors. They will strip out tags they don't understand, and TinyMCE and MicroTiny (both based on tinymce) will both do this.

_________________
Follow me on twitter
--
if you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: Cannot edit CSS that is embedded in content
PostPosted: Wed Jul 18, 2012 8:33 pm 
Offline
New Member

Joined: Wed Jul 18, 2012 3:35 pm
Posts: 3
Thanks calguy1000. As a study of these forums reveals, you are a principle and well respected contributer. So I suspect that I may be suffering concept failure. Let be address your points from my point of view and then you can tell me where I've got it wrong.

Quote:
1. I suggest you read the default content pages that come with CMSMS. They explain a great deal of how CMSMS works with pages and content and styles.

Yep, I've done that twice now and can only find a couple of references to using style sheets. In particular it appears they can only be included via {cms_stylesheet} in the template.

Quote:
2. styles should NEVER be embedded into content areas. You need to understand the concept of separation of design and content.
Yes I understand that concept well, and generally adhere to it (though I note that the minimal template included with the default content, doesn't adhere to that rule). In our case we have the main style sheet embedded in our Smarty header template (as per concept), but one page requires quite a bit of additional CSS. It would be inefficient to include this in the main CSS, just for the sake of one page. So we include that in the header template using a bit of Smarty code that detects the page that the header is part of.
Now, using {cms_stylesheet} how can I conditionally include that style sheet for this one-off page? I couldn't see a way so tried to include it as chunk of style at the head of the content. This appears to be me, to be a no-no with CMSms, I hope I'm wrong.

Quote:
3. WYSIWYG editors are not text editors. They will strip out tags they don't understand, and TinyMCE and MicroTiny (both based on tinymce) will both do this.

That seems entirely reasonable under the circumstances, though I did rather expect that it would have shown up with HTML turned on, but alas no.

Thanks once again for your speedy response.
Oswy


Top
 Profile  
 
 Post subject: Re: Cannot edit CSS that is embedded in content
PostPosted: Thu Jul 19, 2012 11:42 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Aug 12, 2008 9:30 pm
Posts: 1979
Location: Feldkirchen in Kärnten, Austria
If you still have the "need" to add inline styles in Editor area, then create new "Global Content Block" turn WYSIWYG completly off for that GCB and enter your Style, then simply in your "Content" you would add it with something like {global_content name='my_funky_style'}.

Also you can always add extra styles in "Options -> Page Specific Metadata" exactly with {literal}<style>...</style>{/literal} but your {metadata} in Page Template should be called after {cms_stylesheet} or you would be overriding it again.
In same area you can add additional stylesheet simply by calling cms_stylesheet again for example {cms_stylesheet name='style_to_add'}

_________________
CMSMS Blog - I do this!
Forge profile
Github profile
Twitter
=============================================
Support CMSMS


Top
 Profile  
 
 Post subject: [SOLVED]Re: Cannot edit CSS that is embedded in content
PostPosted: Thu Jul 19, 2012 1:52 pm 
Offline
New Member

Joined: Wed Jul 18, 2012 3:35 pm
Posts: 3
Thanks unique3. That's the solution I needed. I inserted {cms_stylesheet name='style_to_add'} at the top of the {content} and all worked well.

After only a couple of days on CMSms, I am amazed at the versatility of the system. I look forward to exploring more of it.

Oswy


Top
 Profile  
 
 Post subject: Re: [SOLVED] Cannot edit CSS that is embedded in content
PostPosted: Sun Jul 22, 2012 6:10 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 11804
Location: Arizona
Embedding the style sheet in the "content" will give you validation errors you are better off adding the style sheet call in the page options metadata box so it ends up in the <head>...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner