Skip to content

brvier/pico-pages-listresume

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Pico Pages List Resume

A nested pages list with resume plugin for the stupidly simple & blazing fast, flat file CMS Pico. This plugin is derivated from Pico Page List Plugin

Installation

Copy pico_pages_listresume.php to the plugins directory of your Pico Project.

Usage

Add a generated nested pages list in your theme by using the following Twig variable :

{{ pages_listresume }}

You'll automatically get something like :

Under the hood :

<ul>
	<li class="titled">
		<a href="http://mysite.com/titled">A cool page</a>
	</li>
	<li class="foo-page is-parent">
		<a href="http://mysite.com/foo-page">Sub-page is coming</a>
		<small>A small resume of the page</small>
		<ul>
			<li class="child is-current">
				<a href="http://mysite.com/foo-page/child">The choosen one</a>
				<small>A small resume of the page</small>
			</li>
			<li class="category">
				category
				<small>A small resume of the page</small>
				<ul>
					<li class="bar">
						<a href="http://mysite.com/category/bar">A page</a>
						<small>A small resume of the page</small>
					</li>
				</ul>
			</li>
		</ul>
	</li>
	<li class="untitled">
		<a href="http://mysite.com/untitled">untitled</a>
		<small>A small resume of the page</small>
	</li>
</ul>

Features

The plugin generate a clean nested html list, using links only if the page exists. The page title is used if possible.

The lists items are defined by css classes allowing per-page or general manipulations :

#nav .foo-page a {
	/* access to a specific page link */
}
#nav .foo-page .child a {
	/* access to a specific foo-page/child link */
}
#nav .is-current {
	/* access to the current page item */
}
#nav .is-parent {
	/* access to every parent item of the current one */
}

To exclude pages from the generated list, add to Pico config the setting hide_pages, and separate paths with commas. Childs of a path will be excluded with their parent :

$config['listresume_hide_pages'] = 'this/page,all/in/here/';

To not generate link for folder :

$config['listresume_create_folder_link] = false;

About

A nested pages list with resume plugin for the stupidly simple & blazing fast, flat file CMS Pico

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages