Colliberty Easy Publisher
Home / Easy Publisher CMS / Documentations / Site Developer FAQ / Hello Navigation Tutorial 2

content  

Hello Navigation (tutorial 2)

Now that we have done our first site (Hello world) we need some navigation to be able to put more pages that the first page.

  • Create the following DTML Methods in EasyEditor

EasyEditor.local_menu:

<dtml-in "EasyNavigation.getMenu(physicalPath)">
<a href="<dtml-var virtualURL>" class="menu_style"><dtml-var navigation_title></a><br>
</dtml-in>

EasyEditor.nav_trail:

<span class="menu_style">
  / <a href="/HelloWorld" class="menu_style">HelloWorld</a>
    <dtml-in "EasyNavigation.getNavigationTrail(physicalPath,skip_root=1)" mapping>
      / <a href="<dtml-var virtualURL>" class="menu_style"><dtml-var       navigation_title></a>
    </dtml-in>
</span>

  • Update the Easy DTML View:

EasyEditor.main.default:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title><dtml-var title_or_id></title>
  <dtml-var "styleSheet(link=1)">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="keywords" content="&dtml.missing-subject;">
  <meta name="description" content="&dtml.missing-description;">
  <meta name="author" content="&dtml.missing-author;">
  <meta name="last-updated" content="&dtml.missing-effective_date;">
  <style>
    .menu_style {font-family: verdana; font-size:10pt; color:#FFFFFF;}
  </style>
</head>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF" text="#000000">
<div style="background:#00C;padding:3px;"><dtml-var nav_trail ></div>
  <table>
    <tr>
      <td>
        <div style="background:#033;padding:3px;"><dtml-var local_menu></div>
      </td>
      <td>
        <div id="content" style="width:100%;height:100%;"><dtml-var content missing=""></div>
      </td>
    </tr>
  </table>
</body>
</html>

  • Create some sub pages in the root (Page1, Page2 Page3).

To make a local menu fixed, use a fixed object path. It need to be physical,
that is it need to start from the real Zope root not a VHM root (which
would be a virtualRoot).