I have a site in my umbraco installation, where I set the site stylesheet as "Related Stylesheet" for the Rich Text Editor data type. So content is appearing the rich format on RTE.
Well, if I add an additional site to the same installation with its own, independant style sheet, and it's own document types, I have to duplicate the RTE data type to use the different style sheet for the new site's RTE fields. When adding several sites, I have to add several RTE data types, which are identical apart from the style sheet applied to it.
Is there a more elegant way to solve this, without adding x copies of the RTE data type?
If I understand your post correctly you use the same styles in the dropdown, but you need them to appear differentli on each site, correct?
Because then it should really be a matter of using the same RTE on all sites with the same stylesheet attached.
Then you could look into giving the root element in your html source (The <html> element) and id, which could be id="domain-com" so every site has a unique id. This can be either hardcoded or done dynamically. It depends how you want it to work.
But by having an id on the <html> element you can use the same styles etc. and just use #domain-com h1{color:#0000FF} in the stylesheet.
No, every site has its own style sheet, and editing contents for a specific site in TinyMCE should use the site's style sheet. To achieve that, I need to add a RTE data type for each site, select the specific style sheet for it, and assing the specific data type to the site's document types:
Style Sheets: Site1.css
Site2.css
DataTypes: Rich text editor Site 1 Related Stylesheets: Site1.css
Rich text editor Site 2 Related Styleheets: Site2.css
Document Types: Site1 Textpage: body (Rich text editor Site 1)
Site 2 Textpage body (Rich text editor Site 2)
This way it works, but having many sites, many copies of the RTE data type are necessary, which is not very elegant I guess.. Is it nevertheless the way to go in Umbraco, or is there an alternative approach?
Is the content in the Site1.css and Site2.css identical?
Do you have
h1,h2,h3,h4,h5,h6 etc. in both of them?
If so...I think you should reconsider the approach I suggest above and then move those styles from site1.css and site2.css into your style.css or whatever your general stylesheet is called.
In there you can have default styling of h1-h6 and then using the #site-id id you can overwrite the headings dependant on the site. This way you don't need to make different RTE's to be able to style the elements uniquely.
Otherwise I'm not sure I fully understand your issue.
The sites should be completely independant from each other, so I would like to have separate .css files (their contents could differ completely).
So I guess then its necessary to create separate data types for each site, right? What I would need to avoid that is a possibility to override data type settings on document type level. Then I could use the same data type when defining the different document types (for each site), and just set the parameter which differes there (in that case related style sheet) on document type level (not data type level).. Would be a cool feature, wouldn't it?
Is that really the desired approach, even if there are several sites to manage? Isn't Umbraco thought as multi-site environment? I thought it is, and I would find it a bit hard to maintain several separate installations (updates etc.)?!
It should not be neccesary to run the multiple installations to have multiple different designed sites, which can reuse the different macroes etc.
I'm not sure how I can explain this in a clearer way than I have tried to in the above...which frustrates me a bit since I'm sure that we're not far from the goal here...
But since the two sites should be independant I guess you would create a different set of templates for the sites?
Otherwise you could make an xslt file where you place the links to your CSS files and make a check to see, what nodeid your root note has. If it's site A, use CSS for site A, if it's site B use CSS for site B. Does it make sense? This way you should be able to reuse the templates if the content structure is the same.
Regarding tinyMce you should really be able to only have ONE RTE stylesheet where you declare the styles that should be listed in the RTE. Now the trick is to NOT add the styling for the RTE elements on the different styles you have created in the stylesheets folder in the settings section. Instead you handle the styling in your external stylesheet. This of course does not make the styling visible inside the Rich text editor, which can possible be a drawback dependent on the content editors understanding of what is going on...
Does this explanation make sense, or am I missing something totally? :-)
thanks again for the explanation, but unfortunately it IS required to make the different styles (depending on the site) visible inside the Rich Text Editor. It should be real WYSIWYG for the editors. If Site1 uses pink headlines, they should appear pink in RTE when editing a Site 1 content and so on...
I think you will be better off with separate installs.
Although Umbraco does support 'Multi Sites' in practice (IMO) this should only be used for sites that are very closely related (multi-lingual sites).
There are too many problems with trying to acheive what you are trying, for example there's no recycle bin if you have the start nodes set to a specific site, macros rendered in RTE's are global across each site, teh problems you are having etc.
I think it would be great if we could over-ride RTE stylesheet on the document type node or even better on the property level. I am trying to find a better way to address similiar issues and this is just for a single site install. The site has a couple different major sections that have different styles applied to common elements such as p, h1, li, etc.
Even if we could just apply a custom class name / filter to the html in the RTE at the property level it would help a lot. I also have a couple document types for more complex page layouts with several rich text editors (one per tab) so that they can edit the text in several predefined divs in the template. The font size & colors are drastically different in each of those divs. It makes getting a nice WYSIWYG experience from the RTE very difficult, which is kind of the whole point of the RTE. : (
Multiple sites + Rich text editor styles
Hi,
I have a site in my umbraco installation, where I set the site stylesheet as "Related Stylesheet" for the Rich Text Editor data type. So content is appearing the rich format on RTE.
Well, if I add an additional site to the same installation with its own, independant style sheet, and it's own document types, I have to duplicate the RTE data type to use the different style sheet for the new site's RTE fields. When adding several sites, I have to add several RTE data types, which are identical apart from the style sheet applied to it.
Is there a more elegant way to solve this, without adding x copies of the RTE data type?
Best Regards
Andreas
Hi Andreas
If I understand your post correctly you use the same styles in the dropdown, but you need them to appear differentli on each site, correct?
Because then it should really be a matter of using the same RTE on all sites with the same stylesheet attached.
Then you could look into giving the root element in your html source (The <html> element) and id, which could be id="domain-com" so every site has a unique id. This can be either hardcoded or done dynamically. It depends how you want it to work.
But by having an id on the <html> element you can use the same styles etc. and just use #domain-com h1{color:#0000FF} in the stylesheet.
Does this suggestion make sense to you?
/Jan
Hi Jan,
thanks for your reply.
No, every site has its own style sheet, and editing contents for a specific site in TinyMCE should use the site's style sheet.
To achieve that, I need to add a RTE data type for each site, select the specific style sheet for it, and assing the specific data type to the site's document types:
Style Sheets:
Site1.css
Site2.css
DataTypes:
Rich text editor Site 1
Related Stylesheets: Site1.css
Rich text editor Site 2
Related Styleheets: Site2.css
Document Types:
Site1 Textpage:
body (Rich text editor Site 1)
Site 2 Textpage
body (Rich text editor Site 2)
This way it works, but having many sites, many copies of the RTE data type are necessary, which is not very elegant I guess.. Is it nevertheless the way to go in Umbraco, or is there an alternative approach?
Hi Andreas
Is the content in the Site1.css and Site2.css identical?
Do you have
h1,h2,h3,h4,h5,h6 etc. in both of them?
If so...I think you should reconsider the approach I suggest above and then move those styles from site1.css and site2.css into your style.css or whatever your general stylesheet is called.
In there you can have default styling of h1-h6 and then using the #site-id id you can overwrite the headings dependant on the site. This way you don't need to make different RTE's to be able to style the elements uniquely.
Otherwise I'm not sure I fully understand your issue.
/Jan
Hi Jan,
The sites should be completely independant from each other, so I would like to have separate .css files (their contents could differ completely).
So I guess then its necessary to create separate data types for each site, right? What I would need to avoid that is a possibility to override data type settings on document type level. Then I could use the same data type when defining the different document types (for each site), and just set the parameter which differes there (in that case related style sheet) on document type level (not data type level).. Would be a cool feature, wouldn't it?
Best Regards
Andreas
Why not have to separete Umbraco installations?
Hi Daniel,
Thanks for your suggestion.
Is that really the desired approach, even if there are several sites to manage? Isn't Umbraco thought as multi-site environment? I thought it is, and I would find it a bit hard to maintain several separate installations (updates etc.)?!
Best Regards
Andreas
I'm looking at a situation identical to Adreas' and would love to get some input from a veteran umbraco user.
Thanks
Stewart
Hi Andreas
It should not be neccesary to run the multiple installations to have multiple different designed sites, which can reuse the different macroes etc.
I'm not sure how I can explain this in a clearer way than I have tried to in the above...which frustrates me a bit since I'm sure that we're not far from the goal here...
But since the two sites should be independant I guess you would create a different set of templates for the sites?
Otherwise you could make an xslt file where you place the links to your CSS files and make a check to see, what nodeid your root note has. If it's site A, use CSS for site A, if it's site B use CSS for site B. Does it make sense? This way you should be able to reuse the templates if the content structure is the same.
Regarding tinyMce you should really be able to only have ONE RTE stylesheet where you declare the styles that should be listed in the RTE. Now the trick is to NOT add the styling for the RTE elements on the different styles you have created in the stylesheets folder in the settings section. Instead you handle the styling in your external stylesheet. This of course does not make the styling visible inside the Rich text editor, which can possible be a drawback dependent on the content editors understanding of what is going on...
Does this explanation make sense, or am I missing something totally? :-)
/Jan
Hello Jan,
thanks again for the explanation, but unfortunately it IS required to make the different styles (depending on the site) visible inside the Rich Text Editor. It should be real WYSIWYG for the editors. If Site1 uses pink headlines, they should appear pink in RTE when editing a Site 1 content and so on...
Best Regards,
Andreas
Hey Andreas,
I think you will be better off with separate installs.
Although Umbraco does support 'Multi Sites' in practice (IMO) this should only be used for sites that are very closely related (multi-lingual sites).
There are too many problems with trying to acheive what you are trying, for example there's no recycle bin if you have the start nodes set to a specific site, macros rendered in RTE's are global across each site, teh problems you are having etc.
Rich
Hi Andreas
Yes, you're right about that. Totally forgot about this because I was so eager to come up with a solution. Obviously it's not 100% bulletproof...
I'll keep you posted if I find a usefull approach on how to solve this (If there is any).
/Jan
I think it would be great if we could over-ride RTE stylesheet on the document type node or even better on the property level. I am trying to find a better way to address similiar issues and this is just for a single site install. The site has a couple different major sections that have different styles applied to common elements such as p, h1, li, etc.
Even if we could just apply a custom class name / filter to the html in the RTE at the property level it would help a lot. I also have a couple document types for more complex page layouts with several rich text editors (one per tab) so that they can edit the text in several predefined divs in the template. The font size & colors are drastically different in each of those divs. It makes getting a nice WYSIWYG experience from the RTE very difficult, which is kind of the whole point of the RTE. : (
is working on a reply...