Common Page Elements

From No3wiki

Table of contents

Parts a streber-page consists of

this is a very rough draft, probably out of date.


Header

Breadcrumbs & Navigation

  • as html looks like this:
       
           <a class=up      href='...' title='Go to parent / alt-U' accesskey=u>^</a>
           <a class='projects' href="...">Active Projects</a>
            > 
           <a class='project' href="...">Resigning bla.com</a>
            > 
       
       
           <a class=current href="...">Tasks</a>
           |
           <a href="...">History</a>
           |
           <a class='active' href="...">Milestones</a>
       
  • only one link can be active, but this might be in the parent span, if it's an overview page e.g. for a project.
 ^ Active Projects > __bla.com__ > Tasks | Milestones | Efforts


Navigation

  • With v0.048 breadcrumbs and page-options are combined into the navigation element. The navigation consist of series of links:
         o The up link
         o Breadcrumbs (showing the way up)
         o Options (showing the way down) 
  • one of this elements is active. Which, is automatically detected by Page::renderBreadcrumbs().
  • Navigation-Links are Objects with following attributes:
 name              shown
 ----------------------------------
 tooltip           optional
 type              UP / BREADCRUMP / OPTION
 target_id         page-id of the target page (used to generate id)
 target_params 	assoc. array of the page-parameters
 url               alternative to target_id
 id                used for customizing the interface (optional. Normally generated from target_id)
 show_separated    the separating em-tag get add. class

Normally the navigation is defined like this:

      $page->navigation= array(
          new NavBreadcrumb(array('target_id'=>'personView',         'name'=>__('Overview'), 'target_params'=>array('person'=>$id ))),
          new NavOption(array('target_id'=>'personViewEfforts',  'name'=>__('Efforts'), 'target_params'=>array('person'=>$id ))),
          new NaviOptionWiki()
      );
  • the up-link will be added automatically to a last (non-current) breadcrumb