projectList()
Description
Generates an HTML list of all projects. If the “Hide Section Titles” option is off, then projects are divided into sections.
Here is an example of the default output (note the 'active' class, which is automatically appended for CSS styling):
<ul id="projects">
<li>
<ul id="print">
<li class="sectionTitle">
Print
</li>
<li class="project">
<a href="/projects/poster">Poster</a>
</li>
<li class="project active">
<a href="/projects/business-card">Business Card</a>
</li>
</ul>
<ul id="web">
<li class="sectionTitle">
Web
</li>
<li class="project">
<a href="/projects/photographer-website">Photographer Website</a>
</li>
</ul>
</li>
</ul>
Usage
<?php echo projectList( $template ); ?>
Parameters
$template
- string
- optional
If you want to replace the default list item with custom HTML, you can supply your own template. The template must be in your theme's templates folder. The default template looks like this:
<li>
<a href="<?php echo linkToProject(); ?>"><?php echo projectTitle(); ?></a>
</li>
Note that the template must, as a minumum, include a list-item
tag (<li></li>
), otherwise you will screw
the HTML.
Examples
Custom template
<?php echo projectList( 'my_template.html' ); ?>
-
FAQ
- What is the Page Type and how do I use it?
- How do I make blog pagination work?
- How can I make next/previous buttons to navigate my projects?
- How do I include Vimeo, YouTube, SoundCloud etc in my projects, pages, blog posts?
- How do I make excerpts for my blog posts? (Using the {more} tag)
- View all (2 more)
-
General Documentation
-
Themes
-
Code Documentation