I haven't yet had the opportunity to spend much time looking at Genshi (nee Markup), which will probably follow Kid as the default templating engine in TurboGears. One thing Kid lets me do that it doesn't yet seem obvious to me how to do in Genshi is this trick.

<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()">

  <div py:match="item.tag=='{http://www.w3.org/1999/xhtml}div' and item.get(u'id')=='header'" py:attrs="item.items()" id="header">
    <?python
    h1 = [e for e in item[:] if e.tag == "{http://www.w3.org/1999/xhtml}h1"]
    if h1:
        h1 = h1[0]
        item = [e for e in item[:] if e.tag != "{http://www.w3.org/1999/xhtml}h1"]
    else:
        h1 = ''
    ?>
    <div id="nav">
      <div py:replace="item[:]" />
      <span py:if="tg.config('identity.on',False) and not 'logging_in' in locals()"
         id="pageLogin">
        <span py:if="tg.identity.anonymous">
          <a href="${tg.url('/login')}">Login</a>
        </span>
        <span py:if="not tg.identity.anonymous">
          <a href="${tg.url('/logout')}">Logout</a>
        </span>
      </span>
      <div py:if="not tg.identity.anonymous" class="welcome">Welcome ${tg.identity.user.display_name}.</div>
    </div>
    <h1 py:replace="h1">Favourites</h1>
  </div>

Basically, what this does is allow a template to describe what additional links should be included in the navigation easily, by placing the links in the div tag with the id header, like so:

  <div id="header">
    <h1> ${photo.name} </h1>
    <a href="#" target="#editphoto" REL="ibox?ibox_type=1&amp;height=300&amp;width=500" title="Edit photo" py:if="not tg.identity.anonymous">Edit photo</a>
  </div>

The match template above discovers that it matches the div with id header, and then picks out the h1 tag. It then adds any additional navigation mentioned in that header div, and then adds login and logout options. Finally, if the user is logged in, welcome them to the system.

On most pages, this is blank, but on some pages I, for example, get to add a "add photo" link: