Entry Tags

The <BlogEntry> container describes the layout of a single entry. Think of <BlogEntry>… </BlogEntry> as a sub-template within the main template for entries.

When the weblog is constructed, everything between these tags will be replaced with all of the entries for that page.

In addition, there is an <Entries> container which is very similar to the <BlogEntry> container. The only difference is that the <BlogEntry> container knows about the context of the template and will return the entries appropriate for that page where as the <Entries> container will only output a list of the most recent entries.

The <BlogEntry> and <Entries> containers can both take the following optional attribtues to control how and what is output…


Tags that only work between <BlogEntry></BlogEntry> and <Entries></Entries>:
Tag Replaced With: Type

<$EntryID$>

The unique ID of the entry

Basic

<$EntryDate$>

The post date of the entry

Date

<$EntryTime$>

The post time of the entry

Date

<$EntryDateTime$>

The post date/time of the entry

Date

<$EntryTitle$>
The title of the entry
Hypertext

<$EntryBody$>

The body text of the entry

Hypertext

<$EntryArchivePage$>

The URL of the archive page of the entry

Basic

<$EntryAuthor$>

The name of the author of the entry

Basic

<$EntryAuthorEmail$>

The entry author’s email address

Can take a "mung" attribute which hides the address from spam robots.

Example: <$EntryAuthorEmail mung="1"$>

Basic

<$EntryAuthorURL$>

The entry author’s URL

Basic

<$EntryPermalink$>

The URL of the entry page of the entry.

Basic

<$EntryKeywords$>
The value of the "keywords" field of the entry. This is useful for supplying a value to meta keywords tag in the entry template.
Hypertext
<$EntryDescription$>
The value of the "description" field of the entry. This is useful for supplying a value to meta description tag in the entry template. Hypertext
<$EntryExtra1$>
The value of the "Extra 1" field of the entry.
Hypertext
<$EntryExtra2$> The value of the "Extra 2" field of the entry. Hypertext

 
In addition, the <BlogEntry> and <Entries> container are both comprised of the following optional sub containers…

<EntryTitle>

The <EntryTitle> and </EntryTitle> specify how to lay out the entry’s title if it has one. The <$EntryTitle$> tag only has meaning between these two tags.

Example: <EntryTitle> <h2><$EntryTitle$></h2></EntryTitle>

Day Headers and Footers

Blog entries can be grouped by days on generated pages through the use of <DayHeader> and <DayFooter>. <$DayHeaderDate$> is replaced with the date of the day and only has meaning between <DayHeader> and </DayHEader>. The Day Header Date will appear at the start of each new day of posts.

Example: <DayHeader><b>Posts for <$DayHeaderDate></b></DayHeader>

Any HTML that you want to appear at the end of a day of posts should be contained within <DayFooter> and </DayFooter>.

Example: <DayFooter> <hr> </DayFooter>

<EntryModifiedDate>

If an entry has been modified, you can specify the HTML that signifies the modification through the use of the <EntryModifiedDate> and </EntryModifiedDate> tags. The <$EntryModifiedDate$> is replaced with the date and time of the modification and only works between <EntryModifiedDate> and </EntryModifiedDate>.

Example: <EntryModifiedDate>Edited on: <$EntryModifiedDate$> </EntryModifiedDate>

<EntryCategories>

You can display which categories and entry belongs to through the use of <EntryCategories> and </EntryCategories>.

The EntryCategories container works the same as a <CategoryList> containers and takes the following attributes…

Example:
<EntryCategories glue=",">
<a href="<$CategoryLink$>"><$CategoryName$></a>
</EntryCategories >

 

<EntryLabels>

This is similar to <EntryCategories> except it prints the labels of an entry.

Example:
<EntryLabels glue=",">
<$Label$>
</EntryLabels>

<IfEmpty>

The <IfEmpty> container only displays its content if the specified tag is empty. That is, it only outputs anything if the tag attribute would not display anything. <IfEmpty> takes the following attribute:

Example:

<IfEmpty="EntryBody">
This will display if the entry body is empty.
</IfEmpty>

<IfNotEmpty>

This container is the inverse of the <IfEmpty> container. <IfNotEmpty> will display its contents only if the tag specified as its attribute is NOT empty.

Example:
<IfNotEmpty="EntryExtra1">
<div id="extra">
Some extra stuff...
<$EntryExtra1$>
</div>
</IfNotEmpty>

Example

A typical <BlogEntry> container might look like this:

<BlogEntry>
<DayHeader><h2><$DayHeaderDate$></h2></DayHeader>
<a name="<$EntryID$>"></a>
<EntryTitle>
<h3><$EntryTitle$></h3>
</EntryTitle>
<$EntryBody$>
<br>
Posted by <a href="mailto:<$EntryAuthorEmail$>"><$EntryAuthor$></a> at
<a href="<$EntryArchivePage$>#<$EntryID$>" title="permalink"><$EntryTime$></a><br>
<EntryModifiedDate>
<i>Edited on: <$EntryModifiedDate$></i><br>
</EntryModifiedDate>
Categories: <EntryCategories glue=", "><a href="<$CategoryLink$>"><$CategoryName$></a></EntryCategories><br>
</div>
</div>
</BlogEntry>