=== Flexi Pages Widget === Contributors: SriniG Donate link: http://srinig.com/wordpress/plugins/flexi-pages/#donate Tags: pages, subpages, menu, hierarchy, sidebar, widget, navigation Requires at least: 2.1 Tested up to: 2.3.3 Stable tag: trunk A highly configurable WordPress sidebar widget to list pages and sub-pages. User friendly widget control comes with various options. == Description == Flexi Pages Widget is a highly configurable WordPress sidebar widget to list pages and sub-pages. Can be used as an alternative to the default 'Pages' widget. Features: * Includes a link to the home page (if this option is selected). * Option to display sub-pages only in parent page and related pages. * Option to select and exclude certain pages from getting displayed in the list. Alternatively, only certain pages can be displayed by using the 'include' option. * Other options include title, sort column/order, text to be displayed for home page link, display and depth options * Multiple instances of the widget -- you can have upto nine instances of the widget * Instead of using the widget, the function flexipages() can be called from anywhere in the template (see [other notes](http://wordpress.org/extend/plugins/flexi-pages-widget/other-notes/) for information on parameters that can be passed into this function). If you are using WordPress version 2.1 series, you will have to download and activate [Sidebar Widgets plugin](http://wordpress.org/extend/plugins/widgets/), and use a widget compatible theme before you can use the Flexi Pages *Widget*. == Installation == 1. Unzip the compressed file and upload the `flexi-pages-widget.php` file (or `flexi-pages-widget` directory) to the `/wp-content/plugins/` directory 1. Activate the plugin 'Flexi Pages' through the 'Plugins' menu in WordPress admin 1. Go to WP admin -> Presentation -> Widgets, drag 'Flexi Pages 1' widget into the sidebar and choose your options 1. An option to select multiple instances of the widget is available in the widgets page. You can have upto 9 instances of the widget == Frequently Asked Questions == = After selecting a few pages for exclusion, isn't it possible to deselect all pages? There is always one page selected for exclusion. = It is possible to deselect all pages. Hold the 'Ctrl' key in your keyboard and click on the name of the page that's not getting deselected. = When the option "List sub-pages only in parent and related pages in hierarchy" is selected, top level pages, children and siblings of the current page, and siblings of the parent page get listed. Is it possible to get rid of siblings of parent page on a subpage while using this option? = Yes. But you have to select the 'Custom depth level' option to achieve this. Enter the number '-3' for custom depth. This way only top level pages and pages in the hierarchy will show up. = Is there an option to list only sub pages and hide the parent pages? = Although such an option does not exist, the 'Include' option can be used to achieve this. Select 'Include' instead of 'Exclude' and select all the pages you want to be listed. Pages left out won't be displayed. = Where do I ask a question about the plugin? = Leave your questions, suggestions, bug reports, etc., as a comment at the [plugin page](http://srinig.com/wordpress-plugins/flexi-pages/ "Flexi Pages Widget") or through [contact form](http://srinig.com/contact/) at the author's website. Questions frequently asked will be incorporated into the FAQ section in future versions of the plugin. == Screenshots == 1. Controls for the Flexi Pages Widget 2. Upto nine instances of the Flexi Pages widget can be added to the sidebar 3. Screenshot of the pages listed on the *home page* when *List sub-pages only in parent and related pages in the hierarchy* option is selected. 4. Screenshot of the pages listed on a *page having sub pages*. You can see the sub-pages expand here while only top level pages are listed in the home page. Same settings as screenshot 2. == The flexipages() template function == Instead of using the sidebar widget, the function `flexipages()` can be used as a template function to display the list of pages. All options available for `wp_list_pages()` can also be used for `flexipages()`. Additionally in `flexipages()`, the depth parameter has two more choices (-2 and -3), and there is an extra parameter to display a link to the blog home page. **depth** (*integer*) This parameter controls how many levels in the hierarchy of pages are to be included in the list generated by flexipages. The default value is -2. * 0 - All pages and sub-pages displayed in hierarchical (indented) form. * -1 - All pages in sub-pages displayed in flat (no indent) form. * -2 (Default) - List sub-pages only in parent and related pages in hierarchy. * -3 - Similar to '-2' above, but siblings of parent pages won't be displayed. Only top level pages and pages in the hierarchy will show up. * 1 - Show only top level Pages * 2 - Value of 2 (or greater) specifies the depth (or level) to descend in displaying Pages. **home_link** (*string*) If a value is specified for this parameter, a link to the home page of the blog will be displayed on top of the list of pages. The link text will be the value specified. For example, `flexipages('home_link=Home')` will display a link to the home page with link text as 'Home'. In addition to the above two, [all other parameters](http://codex.wordpress.org/wp_list_pages#Parameters) used with `wp_list_pages()` can also be used with flexipages(). Refer [WordPress documentation](http://codex.wordpress.org/wp_list_pages) for more details about the `wp_list_pages()` function and to know about how to pass the parameters into the function. == Changelog == * 2008-02-19: Version 1.3 * Multiple instances of the widget * Added 'Include pages' option * `flexipages()` template function * Other minor improvements * 2007-08-31: Version 1.2 * Added option to provide a custom text for the home page link * Custom depth of '-3' will display only parents, siblings and children along with top level pages. Parents' siblings wont be displayed. * Few other improvements and some optimization. * Tested with WordPress 2.3-beta1. * 2007-08-22: Version 1.1.2 * Fixed the missing `</li>` tag for home link * Added class name (`page_item`, `current_page_item`) for home link * 2007-08-17: Version 1.1.1 * bug fix * tested with WordPress 2.2.2 * 2007-08-12: Version 1.1 * bug fix * 2007-08-08: Version 1.0 * Initial release