nextProject()
Description
Outputs a link to the next project in the list. Can also return an array with details about the next project so that you can display the project's title, for example.
Note that this function loops, which means that when the last project is reached, the link returned will point to the first project.
Example array:
Array
(
[id] => 114
[title] => The Great Enhancement Debate
[slug] => the-great-enhancement-debate
[date] => 1276418757
[section] => 1
[pos] => 3
[flow] => group1:one-by-one,textblock746,group2:one-by-one,textblock767,group3:one-by-one
[thumbnail] => greatenhancementdebate.project.jpg
[publish] => 1
[link] => http://www.mikaelstaer.com/projects/the-great-enhancement-debate
)
Usage
<?php
echo nextProject();
$next_project= nextProject( $returnData );
?>
Parameters
$returnData
- true or false
- optional
- default: false
True will force the function to return an array containing details about the next project.
Examples
Using project details in a link
<?php $next_project= nextProject( true ); ?>
<a href="<?php echo $next_project['link']; ?>"><?php echo $next_project['title']; ?></a>
Creating a standard next project link
<a href="<?php echo nextProject(); ?>">Next Project</a>
-
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