All posts in the topic Common footer for each page (Short link)
Summary
- There are 4 posts — by 3 authors — in this topic.
- Latest post made by amar gharat at 2006 Dec 12 05:19 UTC
In the previous thread, it is good to see Alexander Byatt moving over the hurdles towards getting the May version of GroupServer 0.9 operational. Let me start a different thread - What is the best way to get a common footer line for each page - similar to that at http://groupser.org/. From the Zope interface, there are a whole host of tmeplates in /SiteID/Templates/output. I added footer individually to some of the templates which display OK. There I struck a snag with /SiteID/Templates/output/groups_index (which seems to be the template for the groups page). On trying to list the page, it produced the following error listing ************** Site Error An error was encountered while publishing this resource. UnicodeEncodeError Sorry, a site error occurred. Traceback (innermost last): Module ZPublisher.Publish, line 196, in publish_module_standard Module ZPublisher.Publish, line 146, in publish Module Zope2.App.startup, line 222, in zpublisher_exception_hook Module ZPublisher.Publish, line 118, in publish Module ZServer.HTTPResponse, line 253, in setBody Module ZPublisher.HTTPResponse, line 313, in setBody Module ZPublisher.HTTPResponse, line 454, in _encode_unicode UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2014' in position 11347: ordinal not in range(256) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: 'latin-1' codec can't encode character u'\u2014' in position 11347: ordinal not in range(256)) *************** It looks like a unicode error (but unicode is turned on twice (as per another thread) on starting the zope instance. I suspect it is due to corrupt characters in the file /SiteID/Templates/output/groups_index as one can export it as a zope object (but not as xml - produces the same error) and look at the zope object with a hex editor and it contains non ascii characer where I would just expect asci xml. There I have two questions 1) What is the best way to add a common footer to the May release of Groupserver. 2) How can one fix the problem with /SiteID/Templates/output/groups_index which appears to require editing to add a footer for the groups page. Thanks Richard Richard Solly http://eforum.darebin.vic.gov.au/
On Thu, 2006-11-30 at 18:47 +1300, Richard wrote:
> What is the best way to get a common footer line for each page
The new version of GroupServer has a footer on each page by default, so
the easiest way to get this feature is to wait ☺ The way that
GroupServer.org used to generate the footer, is as follows. The version
of GroupServer in development uses a different method, because we use a
different system to create the page templates.
* In the ZMI, alter the "Templates/output/menu.xml" file to
include a footer-links menu.
* Create a footer-links file. It should look like the other menus,
including the context menu, the main menu, and the external
menu.
* In the Zope Products folder, alter the
"GroupServer/Presentation/Tofu/Common/xslt/menu.xsl" file to
contain the following lines, which turn the menu into a
paragraph.
<xsl:template match="menu[@id='footerlinks']">
<p id="footerLinks">
<xsl:for-each select="menuitem">
<a href="{@url}"><xsl:value-of select="@name"/></a>
</xsl:for-each>
</p>
</xsl:template>
* Finally, wherever you want the footer to appear, place the
following line in "adminsection.xsl" and "section.xsl".
<xsl:apply-templates
select="output/menus/menu[@id='footerlinks']"/>
I hope this helps.
>On 01 Dec 2006 09:40 by Michael JasonSmith wrote: >On Thu, 2006-11-30 at 18:47 +1300, Richard wrote: >> What is the best way to get a common footer line for each page >The new version of GroupServer has a footer on each page by default, so >the easiest way to get this feature is to wait. Michael Thanks for your response (including those not quoted). If one combines them with the comment from Dan >On 31 Oct 2006 16:20 by Dan Randow wrote: >You may be aware that we typically deploy new features on our production >sites (including groupserver.org), as soon as they are tested and that >there is unfortunately some lag before they get packaged into a release. >We are doing what we can to increase the release frequency. and one is lazy and waits (:-, then one does not learn at much about Zope and GroupServer in trying to solve these challenges (with very helpful input from Richard, Dan and yourself) which arise as one steps through the installation and customization. The detail in your posting towards the learning experience is much appreciated. I will work my way through your suggestions, as one retains the learning experience, even if a new public release should overtake the personal modifications. Regards Richard Richard Solly http://eforum.darebin.vic.gov.au/
nil