-
1. Re: CMS - How to include css file ?
peterj Aug 29, 2007 10:44 PM (in response to nidhi_hs)Did you place the html file in the base folder in CMS, or did you place it into a subfolder?
For example assume I placed xxx.html into the webapp folder, and then main.css into the webapp/docs/css folder. I would have to change my css reference to:
By the way, I am assuming that you also uploaded the CSS file. -
2. Re: CMS - How to include css file ?
nidhi_hs Aug 30, 2007 9:07 AM (in response to nidhi_hs)I have folder structure docs/documentation under the root folder. Html called index.html is placed under documentation folder. CSS called main.css is placed under docs/css folder.
Yes, I have uploaded the CSS file :) -
3. Re: CMS - How to include css file ?
peterj Aug 30, 2007 3:20 PM (in response to nidhi_hs)I did a little more research and it appears that when CMS uploads an HTML file, it extracts and stores only the contents between the < body > ...< /body > tags. (Or perhaps it does this when the HTML page is displayed.) This means that the stylesheet link is not in the displayed output, hence your stylesheet will not be referenced.
-
4. Re: CMS - How to include css file ?
nidhi_hs Aug 30, 2007 3:25 PM (in response to nidhi_hs)It looks like only way to apply style to the html content is to embed the styles in the html document itself. Am I right ?
-
5. Re: CMS - How to include css file ?
soshah Aug 30, 2007 3:33 PM (in response to nidhi_hs)yes,
style tags are filtered out of the content stored by the cms. This is so that the CMS Portlet which displays the content as portlet markup.
With a style tag in there the markup would become invalid....Although maybe some browsers could still be forgiving...
anyways, the best way is to add the style reference to the JSP page that performs the layout for your portal.
In the default portal this is jboss-portal.sar/portal-core.war/layouts/generic/index.jsp and maximized.jsp
Thanks -
6. Re: CMS - How to include css file ?
nidhi_hs Aug 30, 2007 3:35 PM (in response to nidhi_hs)Thanks for all the inputs. I am using header injection using jboss-portlet.xml to include styles.