Re: [Zope] newbie Simple WebSite Construction Using Zope and Search
Hello Matt, I did something similar a few years ago when we had to merge a number of web-sites, and needed to enable content providers who could not be expected to cope with much more than heading and paragraph tags. The users are very pleased with the site functionality - but the implementation displays my then inexperience with Python and Zope, so could not be packaged for others to use. So I have been working on a Zope 3 implementation, which I hope to make available within a couple of weeks. You can have a look at the Zope 2 site I created (for whatever reason I did not what to use CMS or Plone): http://www.geos.ed.ac.uk/ And this is a screen grab of the Zope 3 package with similar functionality as it stands at the moment: http://www.geos.ed.ac.uk/homes/ceford/zope3/ So I can't answer your questions directly, but: My Zope 2 site used a lot of dtml documents as page components. In Zope 3 I have only used Page Templates. In my Zope 2 site searches also find dtml documents, so I provide a custom display that puts in links to the pages that put the dtml in the right context. E.g. if a search finds a dtml document called page.bdy the link displayed is page.html. Best regards Cliff Ford Matt Slavin wrote: Hi, I am trying to use Zope to create a very simple company website (about 40 pages, or so) with the intention of having the flexibility to expand functionality etc in due course. I have very little Python / DTML experience, but have managed to set up the site using includes on the main index page and then use aquisition to provide the content within each section. I'm not sure if this is a safe - or correct way of going about it, but it seems ideal for our purposes. The navigational menus dynamically include a link to each sub folder - ie website/services/ - and navigating to a section, index_html is automatically shown. The mainContent variable is then dynamically placed into index_html. (So there are separate mainContent dtmlDocuments in About Us, Services etc..) This means we can keep the content completely separate, and do not have to include headers, footers and other includes within the mainContent variable. Brilliant. However, when using the search script - http://www.zope.org/Members/Ioan/SiteSearch - results return a link back to the dtml_Document file mainContent, which gets displayed without any of the header of footer information. Is there any way to render the page with header and footer info? (By, I guess, redirecting the page to the containing folder, so that it pulls out index_html instead...) Any thoughts on this would be gratefully received - as I'm not sure this is the best way of using Zope, but it seems so much better than using plain old included variables. kind regards, Matt - Yahoo! Cars NEW - sell your car and browse thousands of new and used cars online search now - ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie Simple WebSite Construction Using Zope and Search
Hi Matt, Matt Slavin wrote: expand functionality etc in due course. I have very little Python / DTML experience, but have managed to set up the site using Don't torture yourself, use ZPT and not DTML... includes on the main index page and then use aquisition to provide the content within each section. Usually you use acquisition to get the templates and have your content be the structure of the site... However, when using the search script - http://www.zope.org/Members/Ioan/SiteSearch - results return a link back to the dtml_Document file mainContent, which gets displayed without any of the header of footer information. Is there any way to render the page with header and footer info? (By, I guess, redirecting the page to the containing folder, so that it pulls out index_html instead...) Just fiddle in your results method so it generates the correct url.. Sounds like: whatever.aq_parent.absolute_url() ...should get you what you need :-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie Simple WebSite Construction Using Zope and Search
Matt Slavin wrote: Hi, I am trying to use Zope to create a very simple company website (about 40 pages, or so) with the intention of having the flexibility to expand functionality etc in due course. I have very little Python / DTML experience, Python is in itself pretty easy to learn. DTML is a pure horror IMHO, and I avoid it by all means. ZPT (Zope Page Templates) are perhaps not the simplest existing template solution, but combined with metal macros and acquistion, it's a very powerful solution. but have managed to set up the site using includes on the main index page and then use aquisition to provide the content within each section. I'm not sure if this is a safe - or correct way of going about it, but it seems ideal for our purposes. The navigational menus dynamically include a link to each sub folder - ie website/services/ - and navigating to a section, index_html is automatically shown. The mainContent variable is then dynamically placed into index_html. (So there are separate mainContent dtmlDocuments in About Us, Services etc..) This means we can keep the content completely separate, and do not have to include headers, footers and other includes within the mainConte nt variable. Brilliant. However, when using the search script - http://www.zope.org/Members/Ioan/SiteSearch - results return a link back to the dtml_Document file mainContent, which gets displayed without any of the header of footer information. Is there any way to render the page with header and footer info? (By, I guess, redirecting the page to the containing folder, so that it pulls out index_html instead...) What I do is using ZPT and metal macros. 1/ I have one or more master page template(s) for the layout(s). This|these template(s) define a a page macro at the beginning (before the doc type declaration) and slots for the parts that are to be overridden by other templates - one of these slots being the main_content. 2/ then I have content page templates that callback on the appropriate master template and fill in the needed slots The whole thing relies on the Product used for content knowing how to render in a page template (the EpozDocument product provides a good base for this - don't be afraid, it's not that terrible). A sample master template would look like this: metal:block define-macro=page DOCTYPE html head title tal:content=here/title_or_idtitle/title metal:block define-slot=meta/metal:block ... /head body div id=header metal:block define-slot=header the standard header, can be overriden /metal:block /div div id=sidebar metal:block define-slot=sidebar div tal:replace=here/get_side_menu / /metal:block /div div id=main_content metal:block define-slot=main_content this is the main content area, to be overriden /metal:block /div div id=footer the standard header, can be overriden /metal:block /div /body /html /metal:block And a (very simple) page template for a given content type could be (assume there's a get_master_template method (ie python script or method of the content product) that returns the appropriate master template): metal:block use-macro=here/get_master_template/macros/page metal:block fill-slot=main_content h1 tal:content=here/title_or_idthe title/h1 div tal:content=here/content the real content /div /metal:block /metal:block I did my first Zope site with this architecture and the EpozDocument product for content pages, and it has proven to be a pretty usable/maintainable/extensible solution. HTH -- bruno desthuilliers développeur [EMAIL PROTECTED] http://www.modulix.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie Simple WebSite Construction Using Zope and Search
Just wanted to say thanks for all your responses, they were brilliant. It's givenme an insight into further zope use, whilst solving the immediateproblem! Fantastic.CheersMatt Yahoo! Photos – NEW, now offering a quality print service from just 8p a photo.___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] newbie Simple WebSite Construction Using Zope and Search
Hi, I am trying to use Zope to create a very simple company website (about 40 pages, or so) with the intention of having the flexibility to expand functionality etc in due course. I have very little Python / DTML experience, but have managed to set up the site using includes on the main index page and then use aquisition to provide the content within each section.I'm not sure if this is a safe - or correct way of going about it, but it seems ideal for our purposes. The navigational menus dynamically include a link to each sub folder - ie website/services/ - and navigating to a section, index_html is automatically shown. The "mainContent" variable is then dynamically placed into index_html. (So there are separate mainContent dtmlDocuments in About Us, Services etc..) This means we can keep the content completely separate, and do not have to include headers, footers and other includes within the mainConte nt variable. Brilliant.However, when using the search script - http://www.zope.org/Members/Ioan/SiteSearch - results return a link back to the dtml_Document file mainContent, which gets displayed without any of the header of footer information. Is there any way to render the page with header and footer info? (By, I guess, redirecting the page to the containing folder, so that it pulls out index_html instead...)Any thoughts on this would be gratefully received - as I'm not sure this is the best way of using Zope, but it seems so much better than using plain old included variables. kind regards, Matt Yahoo! Cars NEW - sell your car and browse thousands of new and used cars online search now ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )