doc tweaks

This commit is contained in:
John Bintz 2009-11-19 20:54:57 -05:00
parent 1a93ac307b
commit 8aed3b1727
1 changed files with 12 additions and 7 deletions

View File

@ -1,5 +1,10 @@
<h1>Storyline Post Template Tags</h1> <h1>Storyline Post Template Tags</h1>
<p>
<em>ComicPress Core</em> provides a number of functions that allow you to traverse the storyline structure created from your blog's categories.
Technical details about these template tags can be found in the <code>functions.inc</code> file within your <em>ComicPress Core</em> installation.
</p>
<h2>R() and RT()</h2> <h2>R() and RT()</h2>
<p> <p>
@ -11,11 +16,11 @@
<pre class="prettyprint lang-php"> <pre class="prettyprint lang-php">
// use a post programmatically // use a post programmatically
$previous_post = R('previous'); $previous_post = R('previous');
echo get_the_permalink($previous_post->ID); echo get_permalink($previous_post);
// use template tags with a post // use template tags with a post
Protect(); // save the current Loop post Protect(); // save the current Loop post
RT('previous'); $previous_post = RT('previous'); // RT() returns the post, too
the_permalink(); the_permalink();
Restore(); // restore the saved Loop post Restore(); // restore the saved Loop post
</pre> </pre>
@ -161,12 +166,12 @@ R('previous', null, $other_post);
</p> </p>
<ul> <ul>
<li><strong>child_of</strong> =&gt; <em>category slug</em>: Search for matching posts in the provided category and its children.</li> <li><strong>child_of</strong> =&gt; <em>category ID or slug</em>: Search for matching posts in the provided category and its children.</li>
<li><strong>only</strong> =&gt; <em>category slug</em>: Search only the provided category.</li> <li><strong>only</strong> =&gt; <em>category ID or slug</em>: Search only the provided category.</li>
<li><strong>root_of</strong> =&gt; <em>post ID or object</em>: Find the root category the post belongs to and search for posts from that category and in all children.</li> <li><strong>root_of</strong> =&gt; <em>post ID or object</em>: Find the root category the post belongs to and search for posts from that category and in all children.</li>
<li><strong>from_post</strong> =&gt; <em>post ID or object</em>: Search for matching posts in the category this post belongs to.</li> <li><strong>from_post</strong> =&gt; <em>post ID or object</em>: Search for matching posts in the category this post belongs to.</li>
<li><strong>previous</strong> =&gt; <em>category slug</em>: Search for matching posts in the category before the provided category as defined in the storyline structure.</li> <li><strong>previous</strong> =&gt; <em>category ID or slug</em>: Search for matching posts in the category before the provided category as defined in the storyline structure.</li>
<li><strong>next</strong> =&gt; <em>category slug</em>: Search for matching posts in the category after the provided category as defined in the storyline structure.</li> <li><strong>next</strong> =&gt; <em>category ID or slug</em>: Search for matching posts in the category after the provided category as defined in the storyline structure.</li>
<li><strong>level</strong> =&gt; <em>storyline level</em>: Search for posts in the categories defined at this level in the storyline structure, with level 1 being the topmost categories, level 2 being their direct children, etc.</i> <li><strong>level</strong> =&gt; <em>storyline level</em>: Search for posts in the categories defined at this level in the storyline structure, with level 1 being the topmost categories, level 2 being their direct children, etc.</i>
</ul> </ul>
@ -258,4 +263,4 @@ $parent = SC('parent');
// or you can provide a category to be relative to // or you can provide a category to be relative to
$next_from_three = SC('next', 3); $next_from_three = SC('next', 3);
$previous_to_chapter_four = SC('previous', 'chapter-four'); $previous_to_chapter_four = SC('previous', 'chapter-four');
</pre> </pre>