template_widget() info/samples
Intra-page navigation (TOC)
theoretically helpful textUsing 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 Listlorem ipsum
<?php
// display the Category List widget
'widget' => 'coll_category_list',
'block_start' => '<fieldset>',
'block_end' => '</fieldset>',
'block_title_start' => '<legend>',
'block_title_end' => '</legend>',
'display_checkboxes' => 1,
'link_type' => 'context',
) );
?>
⇑ top of page ⇑
Common Linkslorem ipsum
<?php
// display the Common Links widget
'widget' => 'coll_common_links',
'list_start' => '<ul>',
'list_end' => '</ul>',
'item_start' => '<li>',
'item_end' => '</li>',
'show_recently' => true,
'show_archives' => true,
'show_categories' => false,
'show_latestcomments' => false,
) );
?>
⇑ top of page ⇑
Linkbloglorem ipsum
<?php
// display the Linkblog widget
'widget' => 'linkblog',
'block_start' => '<div class="bSideItem">',
'block_end' => '</div>',
'block_title_start' => '<h3 class="sideItemTitle">',
'block_title_end' => '</h3>',
) );
?>
⇑ top of page ⇑
Media Indexlorem ipsum
<?php
// display the Media Index widget
'widget' => 'coll_media_index',
'block_start' => '',
'block_end' => '',
'block_display_title' => false,
'thumb_size' => 'fit-80x80',
'thumb_layout' => 'grid',
'grid_start' => '<table class="image_index" cellspacing="3">',
'grid_end' => '</table>',
'grid_nb_cols' => 8,
'grid_colstart' => '<tr>',
'grid_colend' => '</tr>',
'grid_cellstart' => '<td>',
'grid_cellend' => '</td>',
'order_by' => $Blog->get_setting('orderby'),
'order_dir' => $Blog->get_setting('orderdir'),
'limit' => 1000,
) );
?>
⇑ top of page ⇑
Public Blog Listlorem ipsum
<?php
// display the Public Blog List widget
'widget' => 'colls_list_public',
'block_start' => '<div class="NavBar">',
'block_end' => '</div>',
'block_display_title' => false,
'list_start' => '',
'list_end' => '',
'item_start' => '',
'item_end' => '',
'item_selected_start' => '',
'item_selected_end' => '',
'link_selected_class' => 'NavButton2',
'link_default_class' => 'NavButton2',
) );
?>
⇑ top of page ⇑
Search Formlorem ipsum
<?php
// display the Search Form widget
'widget' => 'coll_search_form',
'block_start' => '<div class="bSideItem">',
'block_end' => '</div>',
'block_title_start' => '<h3 class="sideItemTitle">',
'block_title_end' => '</h3>',
) );
?>
⇑ top of page ⇑
Tag Cloudlorem ipsum
<?php
// display the Tag Cloud widget
'widget' => 'coll_tag_cloud',
'title' => T_( 'Tag Cloud' ). ':',
'block_start' => '<div class="tag_cloud">',
'block_end' => '</div>',
'block_title_start' => '<h3 class="sideItemTitle">',
'block_title_end' => '</h3>',
'max_tags' => 100,
'min_size' => 8,
'max_size' => 22,
) );
?>
⇑ top of page ⇑
User Toolslorem ipsum
<?php
// display the User Tools widget
'widget' => 'user_tools',
'block_start' => '<div class="bSideItem">',
'block_end' => '</div>',
'block_title_start' => '<h3 class="sideItemTitle">',
'block_title_end' => '</h3>',
) );
?>
⇑ top of page ⇑
Taglinelorem ipsum
<?php
// display the blog tagline
'widget' => 'coll_tagline',
'block_start' => '<div class="bSideItem">',
'block_end' => '</div>',
'block_title_start' => '<h3 class="sideItemTitle">',
'block_title_end' => '</h3>',
) );
?>
⇑ top of page ⇑
XML Feedslorem ipsum
<?php
// display the XML Feeds widget
'widget' => 'coll_xml_feeds',
'block_start' => '<div class="bSideItem">',
'block_end' => '</div>',
'block_title_start' => '<h3 class="sideItemTitle">',
'block_title_end' => '</h3>',
) );
?>
⇑ top of page ⇑
| Prev |
|
Next |
| Miscellaneous->method() info/samples |
|
|
|
|