phpDocumentor templates
[ class tree: templates ] [ index: templates ] [ all elements ]
Prev Next

template_widget() info/samples

Intra-page navigation (TOC)

theoretically helpful text

Using template_widget() allows you to place a widget directly into your page flow without the use of a Container. Doing so is harder to start with because you have to edit the appropriate files with the right bit of code, but will save your server a measurable amount of work. Think of Containers as "middle-men" that you want to cut out of the loop and you'll begin to enjoy template_widget()'s purpose.

template_widget() uses ComponentWidget->display() which uses ComponentWidget->init_display() to define the minimum parameters for displaying this widget.

You can, of course, also pass params that are unique to that particular widget.

lorem ipsum - this page is not done. It only shows widgets that are in a 'skin' in the old evo package. Needs to show all widgets with all widget-specific params. Needs to also show the params flow!

Category List

lorem ipsum

  1. <?php
  2. // display the Category List widget
  3.     'widget' => 'coll_category_list',
  4.     'block_start' => '<fieldset>',
  5.     'block_end' => '</fieldset>',
  6.     'block_title_start' => '<legend>',
  7.     'block_title_end' => '</legend>',
  8.     'display_checkboxes' => 1,
  9.     'link_type' => 'context',
  10. ) );
  11. ?>

⇑ top of page ⇑

Common Links

lorem ipsum

  1. <?php
  2. // display the Common Links widget
  3.     'widget' => 'coll_common_links',
  4.     'list_start' => '<ul>',
  5.     'list_end' => '</ul>',
  6.     'item_start' => '<li>',
  7.     'item_end' => '</li>',
  8.     'show_recently' => true,
  9.     'show_archives' => true,
  10.     'show_categories' => false,
  11.     'show_latestcomments' => false,
  12.     ) );
  13. ?>

⇑ top of page ⇑

Linkblog

lorem ipsum

  1. <?php
  2. // display the Linkblog widget
  3.     'widget' => 'linkblog',
  4.     'block_start' => '<div class="bSideItem">',
  5.     'block_end' => '</div>',
  6.     'block_title_start' => '<h3 class="sideItemTitle">',
  7.     'block_title_end' => '</h3>',
  8. ) );
  9. ?>

⇑ top of page ⇑

Media Index

lorem ipsum

  1. <?php
  2. // display the Media Index widget
  3.     'widget' => 'coll_media_index',
  4.     'block_start' => '',
  5.     'block_end' => '',
  6.     'block_display_title' => false,
  7.     'thumb_size' => 'fit-80x80',
  8.     'thumb_layout' => 'grid',
  9.     'grid_start' => '<table class="image_index" cellspacing="3">',
  10.     'grid_end' => '</table>',
  11.     'grid_nb_cols' => 8,
  12.     'grid_colstart' => '<tr>',
  13.     'grid_colend' => '</tr>',
  14.     'grid_cellstart' => '<td>',
  15.     'grid_cellend' => '</td>',
  16.     'order_by' => $Blog->get_setting('orderby'),
  17.     'order_dir' => $Blog->get_setting('orderdir'),
  18.     'limit' => 1000,
  19.     ) );
  20. ?>

⇑ top of page ⇑

Public Blog List

lorem ipsum

  1. <?php
  2. // display the Public Blog List widget
  3.     'widget' => 'colls_list_public',
  4.     'block_start' => '<div class="NavBar">',
  5.     'block_end' => '</div>',
  6.     'block_display_title' => false,
  7.     'list_start' => '',
  8.     'list_end' => '',
  9.     'item_start' => '',
  10.     'item_end' => '',
  11.     'item_selected_start' => '',
  12.     'item_selected_end' => '',
  13.     'link_selected_class' => 'NavButton2',
  14.     'link_default_class' => 'NavButton2',
  15. ) );
  16. ?>

⇑ top of page ⇑

Search Form

lorem ipsum

  1. <?php
  2. // display the Search Form widget
  3.     'widget' => 'coll_search_form',
  4.     'block_start' => '<div class="bSideItem">',
  5.     'block_end' => '</div>',
  6.     'block_title_start' => '<h3 class="sideItemTitle">',
  7.     'block_title_end' => '</h3>',
  8. ) );
  9. ?>

⇑ top of page ⇑

Tag Cloud

lorem ipsum

  1. <?php
  2. // display the Tag Cloud widget
  3.     'widget' => 'coll_tag_cloud',
  4.     'title' => T_'Tag Cloud' ).':',
  5.     'block_start' => '<div class="tag_cloud">',
  6.     'block_end' => '</div>',
  7.     'block_title_start' => '<h3 class="sideItemTitle">',
  8.     'block_title_end' => '</h3>',
  9.     'max_tags' => 100,
  10.     'min_size' => 8,
  11.     'max_size' => 22,
  12. ) );
  13. ?>

⇑ top of page ⇑

User Tools

lorem ipsum

  1. <?php
  2. // display the User Tools widget
  3.     'widget' => 'user_tools',
  4.     'block_start' => '<div class="bSideItem">',
  5.     'block_end' => '</div>',
  6.     'block_title_start' => '<h3 class="sideItemTitle">',
  7.     'block_title_end' => '</h3>',
  8. ) );
  9. ?>

⇑ top of page ⇑

Tagline

lorem ipsum

  1. <?php
  2. // display the blog tagline
  3.     'widget' => 'coll_tagline',
  4.     'block_start' => '<div class="bSideItem">',
  5.     'block_end' => '</div>',
  6.     'block_title_start' => '<h3 class="sideItemTitle">',
  7.     'block_title_end' => '</h3>',
  8. ) );
  9. ?>

⇑ top of page ⇑

XML Feeds

lorem ipsum

  1. <?php
  2. // display the XML Feeds widget
  3.     'widget' => 'coll_xml_feeds',
  4.     'block_start' => '<div class="bSideItem">',
  5.     'block_end' => '</div>',
  6.     'block_title_start' => '<h3 class="sideItemTitle">',
  7.     'block_title_end' => '</h3>',
  8. ) );
  9. ?>

⇑ top of page ⇑

Prev   Next
Miscellaneous->method() info/samples