| |
Tags & Templates Guide
Making custom changes to your template is easy, but you will need to know how to use weblog tags. These tags work with the HTML in your template to create the content on your weblog.
How Variables Work
Variables begin with <% and end with %>. They can be used to output various bits of content on your weblog. For example, placing <%Title%> in your template will output the title of your weblog. Tags begin with <> and end with </>. Any content between them is modified in some way, or looped over and outputted multiple times. For example, placing <Entry><%EntryTitle%></Entry> in your template will display the title of each of your entries.
Tags & Variables List
Tag and Variable Descriptions
Below is a full list of the weblog tags and variables available to you:
-
<%WindowTitle%>
This tag will output the title of your weblog along with the page that you are viewing. It can be used anywhere in your template, though it is specifically designed to maximize searchability when used between the <title></title> tags.
-
<%Title%>
This tag will output the title of your weblog, which you specify in your Profile. You can use this anywhere on your template.
-
<%Description%>
This tag will output a brief description of your weblog, which you specify in your Profile.
-
<%Avatar%>
This tag will output the URL to the weblog owner's avatar, which he/she specifies on the Edit My Profile page if avatars are allowed. Generally, this is used inside an <img> tag, for example: <img src="<%Avatar%>" border="0">
-
<%Email%>
This tag will output the weblog owner's email address, which is specified in his/her Profile.
-
<%Calendar%>
This tag will out put a calendar displaying the current month with days linked for those that contain entries. The following is an example of the way CSS classes can be used to modify the appearance of the calendar:
<style type='text/css'> table.calendar { border: 0; background-color: #FFFFFF; } table.calendar th { height: 10px; font-size: 7pt; text-align: center; border: 0px; } table.calendar td { width: 19px; height: 10px; font-size: 9pt; text-align: center; border: 0px; } table.calendar .calendar-month { font-weight: bold; margin-top: 3px; font-size: 12pt; text-align: center; } table.calendar .calendar-month a { text-decoration: none; } table.calendar .calendar-prev { font-weight: normal; } table.calendar .calendar-next { font-weight: normal; } table.calendar td.linked-day { font-weight: bold; background-color: #EEEEEE; } table.calendar td.linked-day a { text-decoration: none; } table.prevnext { width: 100%; margin-top: .3em; } table.prevnext td { font-size: smaller; } table.prevnext td a { text-decoration: none; } </style>
-
<%MainPageURL%>
This tag will output the address (URL) of your weblog homepage. Use it to link back to your weblog homepage so your visitors can find their way back after clicking on an individual entry. For example: <a href="<%MainPageURL%>">Home</a>
-
<%ProfileURL%>
This tag will output the address (URL) of the weblog owner's profile. Use it to create a link to the weblog owner's profile. For example: <a href="<%ProfileURL%>">My Profile</a>
-
<%ArchiveURL%>
This tag will output the address (URL) of your archives page. Use it to link to your archives page so your users can browse through your older entries. For example: <a href="<%ArchiveURL%>">Archives</a>
-
<%FriendsPageURL%>
This tag will output the address (URL) of your friends' latest entries page. Use it to create a link to your friends page. For example: <a href="<%FriendsPageURL%>">Friends</a>
-
<%SiteFeedURL%>
This tag will output the address (URL) of your weblog's site feed (RSS). Use it to link to your site feed so users can subscribe to your weblog using RSS. For example: <a href="<%SiteFeedURL%>">Site Feed</a>
-
<%AlbumURL%>
This tag will output the address (URL) of the weblog owner's photo album. Use it to create a link to the weblog owner's photo album. For example: <a href="<%AlbumURL%>">My Album</a>
-
<%PodcastURL%>
This tag will output the address (URL) of your weblog's podcast feed. Use it to link to your podcast feed so users can subscribe to your podcast entries using RSS. For example: <a href="<%PodcastURL%>">Podcast</a>
-
<IfMainPage> </IfMainPage>
Anything inside these tags will only be shown on your weblog's homepage.
-
<IfEntryPage> </IfEntryPage>
Anything inside these tags will only be shown on your weblog's entry page.
-
<IfArchivePage> </IfArchivePage>
Anything inside these tags tag will only be shown on your weblog's archive page.
-
<%ArchiveInfo%>
Use this variable between the <IfArchivePage></IfArchivePage> tags. It will output your archive list.
-
<IfFriendsPage> </IfFriendsPage>
Anything between these tags will only be shown on your weblog's friends' latest entries page.
-
<Link> </Link>
You may want to easily display custom links on your weblog. These tags should include the HTML for each custom link and will loop to display all your links as specified on your Edit Profile page. Inside it, you can include any or all of the following variables:
-
<%LinkTitle%>
This variable will output the title of your link.
-
<%LinkURL%>
This variable will output the URL of your link.
-
<Friends> </Friends>
If the administrator has enabled friend lists, you may want to display a list of your friends on your weblog. These tags should include the HTML for each friend link and will loop to display all your friends. Inside it, you can include any or all of the following variables:
-
<%FriendUsername%>
This variable will output your friend's username.
-
<%FriendURL%>
This variable will output the URL to your friend's profile.
-
<Members> </Members>
If the administrator has enabled multi-author weblogs, you may want to display a list of members on your weblog. These tags should include the HTML for each member link and will loop to display all members of the weblog. Inside it, you can include any or all of the following variables:
-
<%MemberUsername%>
This variable will output the member's username.
-
<%MemberURL%>
This variable will output the URL to the member's profile.
-
<Categories> </Categories>
If the administrator has enabled entry categories, you may want to display a list of your entry categories on your weblog. These tags should include the HTML for each entry category and will loop to display all your entry categories. Inside it, you can include any or all of the following variables:
-
<%Category%>
This variable will output your entry category's name.
-
<%CategoryURL%>
This variable will output the URL to a page listing all entries in the category.
-
<RecentEntry> </RecentEntry>
On most weblogs, recent entries appear as a short list of links that show what the author has posted recently. These tags should include the HTML for each recent entry link and will loop to display the number of entries specified on your General Settings page. Inside it, you can include any or all of the following variables:
-
<%RecentEntryTitle%>
This variable will output the title of the recent entry, linked to its permanent address.
-
<%RecentEntryDate%>
This variable will output the date of the recent entry, linked to its permanent address.
-
<%RecentEntryTime%>
This variable will output the time of the recent entry, linked to its permanent address.
-
<Entry> </Entry>
These tags are possibly the most important of all. They are used to display your entries on your weblog. For each entry, everything between these tags will be outputted once - so if you have written five entries, the HTML and weblog variables between these tags will be shown five times. Remember, you can control how many entries you want to display per page on your General Settings page. Below are the variables that you can use between these tags:
-
<%EntryTitle%>
This variable will output the entry's title.
-
<%EntryAuthor%>
This variable will output the entry's author (i.e. your name or display name as specified in your profile).
-
<%EntryAuthorAvatar%>
This variable will output the path to the entry author's avatar if they have one.
-
<%EntryAuthorURL%>
This variable will output the URL to the entry author's profile.
-
<%EntryDate%>
This variable will output the entry's date in the format specified in your General Settings.
-
<%EntryTime%>
This variable will output the entry's time in the format specified in your General Settings.
-
<%EntryBody%>
This variable will output the entry's contents.
-
<%EntryURL%>
This variable will output the path to the entry's Permanent Address. Use this to link each entry to a page where it can be individually viewed, for example: <a href="<%EntryURL%>">Permanent Link</a>
-
<SendThisLink> </SendThisLink>
Anything within this tag will be linked to a Send This Link page. On this page, your visitor will be able to send an email to someone else containing a link to the relevant entry.
-
<IfCategoriesAllowed> </IfCategoriesAllowed>
These tags should be placed between the <Entry> </Entry> tags. Anything between these tags will only be displayed if entry categories are enabled by the administrator.
-
<%EntryCategory%>
This variable will display the entry category you have specified for the entry, linked to the category's page.
-
<IfCommentsAllowed> </IfCommentsAllowed>
These tags should be placed between the <Entry> </Entry> tags. Anything between these tags will only be displayed if comments are enabled by the administrator, and if you are allowing comments on your weblog (as specified on your Comment Settings page). Below are the tags and variables that can be used within:
-
<IfCommentPostAllowed> </IfCommentPostAllowed>
Depending on your settings (on your Comment Settings page), some users may be able to view your comments but not write new ones. Anything between these tags will only be shown to users who are allowed to post comments.
-
<%CommentPostURL%>
This tag will output the address (URL) used to post comments on an entry. If you want to let users comment on your weblog, you should give them a link to this URL. For example: <a href="<%CommentPostURL%>">Post Comment</a>
-
<%EntryCommentCount%>
This tag will output the number of comments posted on the entry. You may want to show this below or above the entry. For example: <%EntryCommentCount%> comments.
-
<Comment> </Comment>
When an entry's comments are shown, they are each displayed using the contents of these tags. If an entry has three comments, the contents of these tags will be outputted three times - once for each comment. Anything between these tags will only be shown if there is one or more comments on the entry. Below are the variables and tags that can be used between these tags:
-
<CommentEdit> </CommentEdit>
If you are allowing users to edit their comments, you will want to give them a link to click when they decide to do so. The contents of these tags will only be shown and linked if the user is allowed to edit their comments. As the author of your weblog, you will also be shown this link. Usage example: <CommentEdit>Edit</CommentEdit>
-
<CommentDelete> </CommentDelete>
If you are allowing users to delete their comments, you will want to give them a link to click when they decide to do so. The contents of these tags will only be shown and linked if the user is allowed to delete their comments. As the author of your weblog, you will also be shown this link. Usage example: <CommentDelete>Delete</CommentDelete>
-
<%CommentTitle%>
This variable will output the comment's title.
-
<%CommentAuthor%>
This variable will output the comment's author name and link it to their profile.
-
<%CommentAuthorAvatar%>
This variable will output the path to the comment author's avatar if they have one.
-
<%CommentAuthorIP%>
If you have enabled IP logging on your Comment Settings page, this variable will output the comment author's IP address to you only.
-
<%CommentDate%>
This tag will output the comment's date in the format specified in your General Settings.
-
<%CommentTime%>
This tag will output the comment's time in the format specified in your General Settings.
-
<%CommentBody%>
This tag will output the comment's body.
-
<%CommentURL%>
This tag will output the comment's permanent address.
-
<IfTrackbacksAllowed> </IfTrackbacksAllowed>
These tags should be placed between the <Entry> </Entry> tags. Anything between these tags will only be displayed if trackbacks are enabled by the administrator, and if you are allowing trackbacks on your weblog (as specified when you create an entry). Below are the tags and variables that can be used within:
-
<%EntryTrackbackURL%>
This tag will output the address (URL) used to send trackbacks to an entry. If you want to let users trackback your weblog entries, you should give them a link to this URL.
-
<%TrackbackCount%>
This tag will output the number of trackbacks sent to the entry. You may want to show this below or above the entry. For example: <%TrackbackCount%> trackbacks.
-
<%TrackbackRDF%>
This variable will output an RDF representing metadata about an entry. You can use this variable to allow weblog clients to auto-discover the Trackback URL.
-
<Trackback> </Trackback>
When an entry's trackbacks are shown, they are each displayed using the contents of these tags. If an entry has three trackbacks, the contents of these tags will be outputted three times - once for each trackback. Anything between these tags will only be shown if there is one or more trackback on the entry. Below are the variables and tags that can be used between these tags:
-
<TrackbackDelete> </TrackbackDelete>
If you want to be able to delete the trackbacks sent to your weblog, you will need a link to click when you decide to do so. The contents of these tags will only be shown and linked if you are logged in. Usage example: <TrackbackDelete>Delete</TrackbackDelete>
-
<%TrackbackBlogName%>
This variable will output the trackback sender's weblog name.
-
<%TrackbackURL%>
This variable will output the trackback sender's weblog URL.
-
<%TrackbackTitle%>
This variable will output the trackback's title.
-
<%TrackbackExcerpt%>
This variable will output the trackback's contents.
-
<%TrackbackDate%>
This variable will output the date the trackback was sent, in the format specified in your General Settings.
-
<%TrackbackTime%>
This variable will output the time the trackback was sent, in the format specified in your General Settings.
-
<IfPages> </IfPages>
This tag's contents will be output only if there is more than one page to your weblog. Generally, this tag is used to display a navigation menu which users can use to move between the various pages of your weblog.
-
<EarlierLink> </EarlierLink>
This tag will link anything inside to the previous (older) page of your weblog. If there are no older pages, the contents of the tag will not be linked.
-
<LaterLink> </LaterLink>
This tag will link anything inside to the next (more recent) page of your weblog. If there are no newer pages, the contents of the tag will not be linked.
-
<%CurrentPage%>
This variable will output the number of the current page.
-
<%TotalPages%>
This variable will output the total number of pages on your weblog.
| |