Binders: post

TODO:

/**
 * Appcropolis Site Binder: post
 * 
 * @param {array} $params 
 *                  $params['show'] What to show (e.g. next, previous, blog)
 *                  $params['assign_to'] Variable withing the template engine to which the content has to be assinged.
 *
 * @example
 * EXAMPLE #1: show previous post
 * {post show="previous"}
 * 
 * EXAMPLE #2: show link to blog home page 
 * {post show="blog" label="Back To Blog"}
 * <a href="http://domain.com/blog/">Back To Blog</a>
 * 
 * EXAMPLE #3:  
 * {post show="next"}
 * <a href="http://domain.com/blog/next-post/">The Next Post</a>
 * 
 * EXAMPLE #4: 
 * {post show="previous" class="pull-right btn btn-primary"}
 * <a class="pull-right btn btn-primary" href="http://domain.com/blog/previous-post/">The Previous Post</a>
 * 
 * EXAMPLE #5: 
 * {post show="previous" assign_to="prev_post" class="btn btn-primary"}
 * 
 * <a class="{$prev_post.class}" href="{$prev_post.post_permalink}">{$prev_post.post_permalink}</a>
 * 
 * 
 * EXAMPLE #6:
 * {post show="categories" assign_to="post_categories"}
 * 
 * {dump var="post_categories"}
 * 
 * 	[
 * 		{
 * 			"id": 1,
 * 			"name": "Miscellaneous",
 * 			"cat_permalink": "http://clean-canvas.appcropolis.net/category/misc/"
 * 		}
 * 	]
 * 
 *
 * EXAMPLE #5: 
 * {post show="last" assign_to="post" }
 *
 * 
 * @see http://codex.wordpress.org/Function_Reference/get_adjacent_post
 */

 

END

Leave a Reply

Your email address will not be published. Required fields are marked *