What is the Best Way to Include CSS Stylesheets in Zope
I would like for all of my Zope pages to use a CSS stylesheet by default. Ideally I would be able to keep the reference to the stylesheet in only one place in Zope and have changes to the stylesheet filename propagate globally. The Beehive book does not mention anything about how to integrate CSS stylesheets into Zope. Does anyone what is the best way to do so?
Hi, Upload the stylesheet as a DTML Method or a file and reference it by its URL in a link tag. zvi@12thplanetcafe.com wrote:
I would like for all of my Zope pages to use a CSS stylesheet by default. Ideally I would be able to keep the reference to the stylesheet in only one place in Zope and have changes to the stylesheet filename propagate globally.
The Beehive book does not mention anything about how to integrate CSS stylesheets into Zope. Does anyone what is the best way to do so?
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
Put the link stuff in your <dtml-var standard_html_header> and it will get found and applied automatically. On Sat, 20 Apr 2002, Chris McDonough wrote:
Upload the stylesheet as a DTML Method or a file and reference it by its URL in a link tag.
zvi@12thplanetcafe.com wrote:
I would like for all of my Zope pages to use a CSS stylesheet by default. Ideally I would be able to keep the reference to the stylesheet in only one place in Zope and have changes to the stylesheet filename propagate globally.
The Beehive book does not mention anything about how to integrate CSS stylesheets into Zope. Does anyone what is the best way to do so?
zvi@12thplanetcafe.com wrote:
I would like for all of my Zope pages to use a CSS stylesheet by default. Ideally I would be able to keep the reference to the stylesheet in only one place in Zope and have changes to the stylesheet filename propagate globally.
The Beehive book does not mention anything about how to integrate CSS stylesheets into Zope. Does anyone what is the best way to do so?
There are two ways to handle it. 1. Well you can do this via an inline css method. You can do that by creating a dtml method and using that to insert appropriately in to every page. 2. Create a css page in zope and then just reference it through the dtml standard header.
There is an example in the zope book ("Creating Basic Zope Applications" chapter, "Factoring Out Style Sheets" section). Creating a DTML Document called style_sheet, and changing the standard_html_header to include the <dtml-var style_sheet> tag. This way you can override the style_sheet in lower directories. -walter "Yury German" <yuryg@cozydot.com> wrote:
zvi@12thplanetcafe.com wrote:
I would like for all of my Zope pages to use a CSS stylesheet by default. Ideally I would be able to keep the reference to the stylesheet in only one place in Zope and have changes to the stylesheet filename propagate globally.
The Beehive book does not mention anything about how to integrate CSS stylesheets into Zope. Does anyone what is the best way to do so?
There are two ways to handle it.
1. Well you can do this via an inline css method. You can do that by creating a dtml method and using that to insert appropriately in to every page. 2. Create a css page in zope and then just reference it through the dtml standard header.
I've uploaded the css file and included this line into the standard_html_header <link rel="stylesheet" href="media/standard_css" type="text/css"> Works fine! Martin
zvi@12thplanetcafe.com wrote:
I would like for all of my Zope pages to use a CSS stylesheet by default. Ideally I would be able to keep the reference to the stylesheet in only one place in Zope and have changes to the stylesheet filename propagate globally.
The Beehive book does not mention anything about how to integrate CSS stylesheets into Zope. Does anyone what is the best way to do so?
From: <zvi@12thplanetcafe.com>
I would like for all of my Zope pages to use a CSS stylesheet by default. Ideally I would be able to keep the reference to the stylesheet in only one place in Zope and have changes to the stylesheet filename propagate globally.
My "Best practice": You make an index_html in the root that contains the complete design of the site, including the css. From this index_html you also include the content, by <dtml-var content>. Then you create one directory for each page, and in each directory you put a dtml method call "content" in which you put that specific pages content. After that, all you need is automatic navigation, and you have a content management system! Whooho!
On Sat, Apr 20, 2002 at 08:32:54AM -0700, zvi@12thplanetcafe.com wrote:
I would like for all of my Zope pages to use a CSS stylesheet
http://www.zope.org/Members/haqa/ZStyleSheet Install the Product, convert your stylesheets to instances of the Product, and put references to the instances into your standard_html_header. Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
Hi Zopers from around the world... I am going to ask a Q that I actually have solved, but if there are other solutions I would like to know... The thing is that we (headnet) are trying to "tune-up" the great prod CMF.. One thing that is missing is "Manual Sort".... This means that we would like to make the customers able to use a manual sort-order of misc objects... Here is one example: Problem: ========= If you create a new news-item and you really want it to be top news for a lonmg time... how to do this...? Headnet-Solution: ========= We made a (very simple) script like this: name(id) of the script: reelsort parameter list: L=[] ========= L2=[] for item in L: L2=L2+[item.getObject()] return L2 ========= (btw: is there any other way to do this .. ?) The reason for this is that when you use portal_catalog(meta_type='xxx', review_state='yyy') you cannot sort by it after for instance getObject().zzz, because it is not included in the catalog metadata / indexes..... furthermore we added a property (SortID) to the objects (news) and replaced the "<dtml-in "portal_catalog(meta_type='News Item', review_state='published')"> - instances with : <dtml-in "reelsort(portal_catalog(meta_type='News Item', review_state='published'))" sort=SortID> and a bit of fiddling with the getUrl and getObject.... result: we can now sort news (and other) manually... So back to the q: Is there any other suggestions.... = ) /Stoons @ :HeadNet: PS: I hope you can understand my "Denglish", I am from Denmark = )
participants (9)
-
Chris McDonough -
Dennis Allison -
Lennart Regebro -
Martin Möller -
Oleg Broytmann -
Thomas @ HeadNet -
Walter Truitt -
Yury German -
zvi@12thplanetcafe.com