[Michael T. Babcock] Zope related code


I host this site (and others) on Zope. Its a really powerful application server with a lot of interesting features. I'd go on and on but, you wouldn't care, so here's some related code snippets instead...

Google+ [+1] icon

The Google+ +1 icon (as seen above) is generated by fairly simple code (and some Javascript Google provides). The code they use requires a reference to the URL of the page its hosted on, which I insert using TAL (the template language in Zope) like so:

    <div style="float: right; padding-top: 3em;" id="main_h1_right">
    <g:plusone size="small" annotation="inline" 
       tal:attributes="href context/absolute_url"
       href="http://mikebabcock.ca"></g:plusone>
    </div>
    <h1><a rel="me" href="http://mikebabcock.ca/"><img 
           id="buddy_icon" src="/images/buddy_icon.png"
           alt="[Michael T. Babcock]" title="Mike Babcock's buddy icon" /></a>
        <span tal:replace="here/title_or_id" /></h1>

I've actually included my header code as well since this is a generic template I use for every page on this site. The template pulls in the current URI with "context/absolute_url" for the Google+ icon, and the title of the current page with "here/title_or_id". By doing this, the actual pages on the site are maintained without headers (or footers) much more easily.

Other scripts

Stumble it! XFN Friendly Powered by DJBDNS Powered by Zope Valid CSS! Website Security Test

Served by:  Zope 2.7.6

Page Copyright © 2014, Michael T. Babcock. All Rights Reserved.

To contact me, send an E-mail to sawyoursite at this domain.

If you'd really like your mail server reported for spam, send me some junk mail to junk-yum@mikebabcock.me or devnull@mikebabcock.me. This site powered by djbdns