Using standard_html_header and standard_html_footer in every Document on your site... But that way if i want to change the structure, i have to change on every page.
No, you only need to change 2 places: standard_html_header and standard_html_footer :) All Documents that use these header/footer will be rendered using new structure. Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
From: Oleg Broytmann
But that way if i want to change the structure, i have to change on every page.
No, you only need to change 2 places: standard_html_header and standard_html_footer :) All Documents that use these header/footer will be rendered using new structure.
I think you misunderstand him. He is actually right. Some things are pretty hard to do in zope, because of the header/footer principle. Making a global look to a site can be pretty difficult if it doesn't fit nicely into a header/footer structure, with a main area being the pages' unique content. If I where to do it in regular Python I would use special classes for special layouts. That is hard to do in Zope. Regards maxm Max M. W. Rasmussen, Denmark. New Media Director private: maxmcorp@worldonline.dk work: maxm@normik.dk ----------------------------------------------------- Specialization is for insects. - Robert A. Heinlein
On Thu, 14 Dec 2000, Max M wrote:
If I where to do it in regular Python I would use special classes for special layouts. That is hard to do in Zope.
Why hard? Not hard at all - develop your own set of classes, make it into a Product, and use instance of these classes instead of DTML Documents. Actually, there is nothing special in DTML Documents - they are instances of DTMLDocument class, nothing more. Creating your own type of document is not harder, IMHO. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On Thu, 14 Dec 2000, Oleg Broytmann wrote:
On Thu, 14 Dec 2000, Max M wrote:
If I where to do it in regular Python I would use special classes for special layouts. That is hard to do in Zope.
Why hard? Not hard at all - develop your own set of classes, make it into a Product, and use instance of these classes instead of DTML Documents. Actually, there is nothing special in DTML Documents - they are instances of DTMLDocument class, nothing more. Creating your own type of document is not harder, IMHO.
I was thinking about that to ! But how could you build a page with the template developed ?? something like: <dtml var template(COMPONENTS LIKE HEADER AND FOOTER AS ARGUMENTS)> and how can you generelize the objects to beeing used by the template ?
Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
_______________________________________________ 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 )
On Thu, 14 Dec 2000, Nuno Goncalves wrote:
Why hard? Not hard at all - develop your own set of classes, make it into a Product, and use instance of these classes instead of DTML Documents. Actually, there is nothing special in DTML Documents - they are instances of DTMLDocument class, nothing more. Creating your own type of document is not harder, IMHO.
I was thinking about that to ! But how could you build a page with the template developed ?? something like: <dtml var template(COMPONENTS LIKE HEADER AND FOOTER AS ARGUMENTS)> and how can you generelize the objects to beeing used by the template ?
No, no, no! :) You misunderstand how the Zope works. You think that basic building block is a piece of HTML (probably you think to put it into DTML Documents). No. In Zope basic building block is "instance of some python class". A DTML Document is an instance of DTMLDocument class, e.g. If you develop your own set of classes, you'll just build Zope sites creating instances of these classes - you put HTML fragmenst just into these instances. Zope will call your objects, you don't need to use DTML to call them. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
But how could you build a page with the template developed ?? something like: <dtml var template(COMPONENTS LIKE HEADER AND FOOTER AS ARGUMENTS)> and how can you generelize the objects to beeing used by the template ?
No, no, no! :) You misunderstand how the Zope works. You think that basic building block is a piece of HTML (probably you think to put it into DTML Documents). No. In Zope basic building block is "instance of some python class". A DTML Document is an instance of DTMLDocument class, e.g. If you develop your own set of classes, you'll just build Zope sites creating instances of these classes - you put HTML fragmenst just into these instances. Zope will call your objects, you don't need to use DTML to call them.
humm !!! I see now !! So i can have a general structure for all my site and when create a page, specifying the template to use and consequently adding the objects that i want ?? Nuno
Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On Thu, 14 Dec 2000, Nuno Goncalves wrote:
humm !!! I see now !! So i can have a general structure for all my site and when create a page, specifying the template to use and consequently adding the objects that i want ??
No, you should separate design (template) and content. Actually, it is possible even without creating a python product - you put content (HTML fragments) into small DTML Documents, and define design (template) using DTML Methods - standard_html_header/footer and other methods, your custom methods. Think, for example, you want to create a site with the following design: ------------------------------------- | | | left | CONTENT1 | right | column | | column | | special | | | fature | | | | | | CONTENT2 | | | | | ------------------------------------- Easy! (Thanks, Zope! :) You define "left column" in standard_html_header, "right column" in standard_html_footer, in every folder put two pieces of content and feature into 3 DTML Documents, and call these Documents again from standard_html_header (or DTML Methods that will be called from standard_html_header). In outline, your standard_html_header will looks like the following: <HTML><HEAD><TITLE><dtml-var title_or_id></TITLE></HEAD> <table><dtml-comment>I'll skip most HTML-related things like tr td etc</dtml-comment> <dtml-var left-column> <dtml-var CONTENT1> <dtml-var feature> <dtml-var CONTENT2> Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On Thu, Dec 14, 2000 at 06:25:19PM +0100, Max M wrote:
Some things are pretty hard to do in zope, because of the header/footer principle.
Making a global look to a site can be pretty difficult if it doesn't fit nicely into a header/footer structure, with a main area being the pages' unique content.
Although I agree that Zope misses real templates (like in M4 or, to take a more Web-centric example, in WML <http://www.engelschall.com/sw/wml/>, there are several workarounds: 1) if you need "standard" elements between header and footer, a bit of discipline from the page authors (which can be helped by tools like HTML-kit, where you can define a template for the new and empty page): <dtml-var header> ... Content here <dtml-var inbetween> .. More content here <dtml-var footer> 2) DTML methods allow you to replace a lot of what would be document-specific elements (such as context-dependant navigation bars), helping to stay in the header/footer paradigm. On the other hand, they are very complicated to use properly.
i see !!! i have just found a package ZopeFish that has ZFSuite. ZFSuite has an object (ZF document template) that defines a layout and structure for the entire site. More info at http://www.zope.org/WikiCentral/ZFWiki still i installed it (it is a bunch of libs) but i haven't tested it ! if i get it work i will tell you thanks On Thu, 14 Dec 2000, Max M wrote:
From: Oleg Broytmann
But that way if i want to change the structure, i have to change on every page.
No, you only need to change 2 places: standard_html_header and standard_html_footer :) All Documents that use these header/footer will be rendered using new structure.
I think you misunderstand him. He is actually right.
Some things are pretty hard to do in zope, because of the header/footer principle.
Making a global look to a site can be pretty difficult if it doesn't fit nicely into a header/footer structure, with a main area being the pages' unique content.
If I where to do it in regular Python I would use special classes for special layouts. That is hard to do in Zope.
Regards maxm
Max M. W. Rasmussen, Denmark. New Media Director private: maxmcorp@worldonline.dk work: maxm@normik.dk ----------------------------------------------------- Specialization is for insects. - Robert A. Heinlein
_______________________________________________ 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 )
participants (5)
-
Max M -
Nuno Goncalves -
Oleg Broytmann -
Oleg Broytmann -
Stephane Bortzmeyer