§Template Tags Overview.
This is a list of all the template tags that can be used in your templates. This list is included as a reference, and not necessarily as a means to writing your own templates. Inspecting the default templates will give you a much better idea of how it all fits together.
§[[include]]
Use this to include files into your templates or entries.[[include:header.html]]
§[[image]]
Use this to place an image in your entries. Parameters used are the name of the image, the alt attribute, the alignment and the width of the border.[[image:image.gif:Some image:center:1]]
§[[popup]]
Use this to place an image or text-link in your entries, which will open an image in its own window. Parameters used are: filename, name of the thumbnail image or text or '(thumbnail)' to insert the thumbnail that pivot generated, alt attribute, alignment and borderwidth.[[popup:christina.jpg:(thumbnail):x-tina!:1:center]] [[popup:image.jpg:an image::0:right]]
§[[lower]] and [[upper]]
Use this to convert a bit of text to uppercase or lowercase. Not very usefull[[lower:NO uPPERcaSE]]
§[[weblogtitle]]
Use this to insert the weblog's title as defined in .§[[weblogsubtitle]]
Use this to insert the weblog's subtitle or tagline, as defined in .§[[weblogname]]
Use this to insert the weblog's name, as used by pivot to identify it, as defined in .§[[link_list]]
Use this to insert the file templates/_aux_link_list.html. Normally this is used to keep an updated list of links to friends or other sites you read. Nepotism rules!§[[archive_list]]
Use this to insert a list of links to the archives for the current weblog. Option for this can be set in§[[subweblog]]
use this to define subweblogs in the templates for the frontpage or archivepage. The only parameter is the name of the subweblog, and this is used in to determine which categories are published in this subweblog.[[subweblog:linkdump]] [[subweblog:standard]]
§[[weblog]]
An alias for [[subweblog]]. Do not use.§[[archive]]
An alias for [[subweblog]]. Do not use.§[[uid]]
Use this to insert the internal unique number each entry has.§[[title]]
Use this to insert the title of an entry§[[subtitle]]
Use this to insert the subtitle of an entry§[[introduction]]
Use this to insert the introduction of an entry§[[body]]
Use this to insert the body text of an entry§[[date]]
Use this to insert a date. Without parameter, this uses the format as specified under 'Entry Date' in , on the third page. With a parameter you can override this format:[[date:%day% %monthname%]]
For formatting options, see the Date Formatting page.
§[[fulldate]]
Use this to insert a date. This uses the format as specified under 'Full Date' in , on the third page. For formatting options, see the Date Formatting page.§[[diffdate]]
Use this to insert a date, but only if the date is different from the date of the previous entry. This uses the format as specified under 'Diff. Date' in , on the third page. For formatting options, see the Date Formatting page.§[[cookie]]
Use this to display remembered information in commentforms. See the file templates/_sub_commentform.html for examples of how to use.§[[user]]
Use this to display information about the author of the entry. Use like this:[[user]] [[user:email]] [[user:emailtonick]] [[user:nick]]
If you defined more userfields under [[user:myuserfieldname]], where 'myuserfieldname' is the name you gave the userfield, off course.
, you can use these in the templates by simply using§[[category]]
Use this to insert the category or categories of the entry. An optional parameter can be used to only output the categories that are published in the current weblog.[[category:onlythisweblog]]
§[[email]]
Alias for [[user:email]]. Do not use.§[[email_to_nick]]
Alias for [[user:emailtonick]]. Do not use.§[[more]]
Use this to insert a link to the body text of an entry. If the entry has only an introduction, nothing will be output.§[[comments]]
Use this to insert the comments for an entry. The format of the output is defined under 'Format of Comments' in .§[[commentform]]
Use this to insert the standard comment form. The template for this is templates/_sub_commentform.html§[[archivenext]]
Use this to make a link to the next archive. With 'next' we mean the first one that's older. With a parameter you can define the output:[[archivenext:To the next archive!]]
§[[archiveprevious]]
Use this to make a link to the previous archive. With 'previous' we mean the first one that's newer. With a parameter you can define the output:[[archivenext:To the previous archive!]]
§[[nextentry]]
Use this to link to the next entry. With parameters you can format the output, and cut off text that is too long:[[nextentry:<a href='%link%'>to the entry called '%title%'</a>:50]]
§[[previousentry]]
Use this to link to the previous entry. With parameters you can format the output, and cut off text that is too long:[[previousentry:<a href='%link%'>to the entry called '%title%'</a>:50]]
§[[nextentryincategory]]
Use this to link to the next entry that is published in the same category (or, if either of them are published in more than one category, the sets should have at least one overlapping category). With parameters you can format the output, and cut off text that is too long:[[nextentryincategory:<a href='%link%'>to the entry called '%title%'</a>:50]]
§[[previousentryincategory]]
Use this to link to the previous entry that is published in the same category (or, if either of them are published in more than one category, the sets should have at least one overlapping category). With parameters you can format the output, and cut off text that is too long:[[previousentryincategory:<a href='%link%'>to the entry called '%title%'</a>:50]]
§[[label]]
Used to insert localized bits of text.. Mostly used in templates/_sub_commentform.html. See langs/pvl_eng.php for examples, under $lang['weblog_text'].[[label:disclaimer]]
§[[pivotbutton]]
Use this to place a small button with a link to the Pivot site at www.pivotlog.net. Mad props, yo!You can replace the image located at pivot/pics/pivotbutton.png, and this tag will still output the correct html.
§[[rssbutton]]
Use this to display a button with a link to the weblogs RSS file. You can replace the image located at pivot/pics/rssbutton.png, and this tag will still output the correct html.§[[atombutton]]
Use this to display a button with a link to the weblogs Atom file.You can replace the image located at pivot/pics/atombutton.png, and this tag will still output the correct html.§[[rss_autodiscovery]]
Use this to insert a <link rel="alternate" /> tag in the <head> section of the page, which is used by rss aggregator software to detect the URL of the RSS feed.§[[atom_autodiscovery]]
Use this to insert a <link rel="alternate" /> tag in the <head> section of the page, which is used by Atom aggregator software to detect the URL of the Atom feed.§[[last_comments]]
Use this to display a list of the last comments left by visitors. The format is defined under 'Settings for last comments' in .§[[emotpopup]]
Use this to insert a link to the small emoticons reference. Only displayed if emoticons are enabled.§[[textilepopup]]
Use this to insert a link to the small textile reference. Only displayed if Textile is enabled/§[[singlepermalink]]
Use this to make a link to this entry on its own page.§[[permalink]]
Use this to make a link to this entry in the archives.§[[commentlink]]
Use this to make a link to the comments on this entry§[[commcount]]
Use this to display the number of comments. The format of this is defined in .§[[commnames]]
Use this to insert a list of the names of people who left a comment on a particular entry.§[[inlinecommentlink]] and [[inlinecomments]]
Use this to insert a bit of javascript to show the comments on this entry, without leaving the current page. To make this work, you need to do the following:somewhere in the <head>-section of your document, you need to include a javascript file (most likely in your frontage.html template):
<script src="[[pivot_dir]]includes/js/dyna_content.js" type="text/javascript"></script>
Then, where you want the link to appear, insert [[inlinecommentlink]] and where you want the comments themselves, insert [[inlinecomments]] (these go into templates/_sub_entry_standard.html if you're changing the default files):
<div class="entryfooter"> .... [[inlinecommentlink]] </div> [[inlinecomments]]
§[[inlinemorelink]] and [[inlinemore]]
Use this to insert a bit of javascript to show the body text of an entry, without leaving the current page. To make this work, you need to do the following:<script src="[[pivot_dir]]includes/js/dyna_content.js" type="text/javascript"></script>
Then, where you want the link to appear, insert [[inlinemorelink]] and where you want the body text itself, insert [[inlinemore]] (these go into templates/_sub_entry_standard.html if you're changing the default files):
[[introduction]] [[inlinemorelink]] [[inlinemore]]
§[[search]]
Use this to insert a small form that leads to the search output screen. You can use the optional parameters to change the label on the button, or remove the button altogether[[search:nobutton]]In your CSS-file you can use the following rules to style the output:
or
[[search::go!]]
/* these styles are for the search boxes */ .searchbox { width: 10em; font-size: 10px; } .searchbutton { border: 1px solid #000; font-size: 10px; }
§[[show_referrers]]
Use this to display a list of the last referers. The format is defined under 'Settings for last Referers' in .§[[show_referrers_entry]]
Use this to display a list of the last referers for a single entry.§[[get_referrer]]
Put this in the page somewhere. It doesn't produce any output, but it is required to keep track of referers.§[[home]]
Use this to insert the URL of the weblogs homepage.§[[template_dir]]
Use this to insert the URL of the template dir. Useful for when you want to include files that are in the templates/ folder.<link rel="stylesheet" type="text/css" href="[[template_dir]]pivot_template.css" />
§[[pivot_dir]]
Use this to insert the URL of the template dir. Useful for when you want to include files that are in the pivot/ folder.<script src="[[pivot_dir]]includes/js/dyna_content.js" type="text/javascript"></script>
§[[log_dir]]
Use this to link to files in the root folder of your weblog.<link rel="stylesheet" type="text/css" href="[[log_dir]]mkt_v7.css" />
§[[vote]]
Use this to make simple polls[[vote:sucks:Polls suck::(%num% votes)]] [[vote:rocks:Polls rock::(%num% votes)]] [[vote:pancakes:I like pancakes::(%num% votes)]]
§[[karma]]
Use this to insert links that will allow the visitor to rate an entry, by adding or decreasing the karma score.[[karma:good:+]] [[karma:bad:-]]
§[[message]]
This is used in the comment forms to display messages to visitors when posting or previewing comments .§[[close_on_esc]]
This is used to insert a short snippet of javascript, that will allow visitors to close popup windows by pressing the escape key.§[[calendar_style]]
Use this to insert the <style> tags for the calendar. Place this in the <head> section of your document.§[[calendar]]
Use this to insert the calendar with links to your entries.§[[charset]]
Use this to insert the current charset, like ISO-8859-1.§[[blogroll_iframe]]
Use this to insert an iframe with your blogroll. The format is defined in . You can set the width and height with parameters:[[blogroll_iframe: 150:400]]
§[[rss]]
Use this to insert an RSS feed into your file. With parameters you can specify the url of the feed, the maximm number of elements and the format.[[rss:http://slashdot.org/slashdot.rss:10]]
or
[[rss:http://blogdex.net/xml/index.asp:6:<b><a href="%link%">%title%</a></b><br />
<small>%description%</small><br />]]