|
Posts
Now this is the part we all are curious about: adding posts to our Xanga site. The format of posts is a bit different than the modules and links above. To understand why, let's revisit the post section of the sample site. NOTE: if you want to skip all this, you can just include your posts in your page using the <$Posts$> tag. This will include your post in the default Xanga format. However if you want more control over the formatting of your posts, read on. As you can see, the post section is not just a list of posts; it is actually made up of two parts: the date header indicating which day the post was written, and the actual post itself. Xanga Skins allow you to customize how each of these sections looks. ![]() We first have to indicate where the posts section begins and ends; this is basically the entire grey area in the image above. To do this we use the <XANGA> and </XANGA> tags. Any text inside these tags will be repeated for each post on the page. Now that we've decided where to put our posts, let's format the date section. Printing the actual date is much the same as the other Xanga tags; just use the tag <$Xanga_Date$> and the date will be substituted for the tag. But you need some way to separate the code for the date from the code for the post. This is done using the <XANGA_DATE_HEADER></XANGA_DATE_HEADER> tags. Anything between these tags will be used for the date section only. For example, on our sample site, the date is displayed in its own table. As you can see in the code below, the HTML for this table is in between the <XANGA_DATE_HEADER> tags. This insures that the HTML will be used only for the date section.
Now let's move on to formatting you actual posts. The code for the
posts goes inside the
You can use HTML in this section just like on the rest of your Skin. Just remember that anything inside the <XANGA_DATE_HEADER> section will show up every time the date is displayed, and anything inside the <XANGA> section (but outside <XANGA_DATE_HEADER>) will show up every time a post is displayed.
|