Textpattern 1.0RC3 · 20.02.05
As you probably know, the third release candidate of Texpattern 1.0 is out. You should know that I’ve been on the development progress for this TXP release too and, of course, that I haven’t updated the Tag Manual since May.
Jeff Soo has sent my a nice revision of the manual made by an english speaker person – which was, of course needed: to admit your limitations is the first step to solve them – and I have to properly update the existing texts, add more examples and the new tags.
Johanes Gamper is currently translating the manual to German; Hideo Joho to Japanish and TTX – my work partner – is helping me on the spanish translation.
Main idea is to collaborate with the full manual to Textpattern Book but – AIM talks are very amusing sometimes – I’ve said Dean that I jib to write on a wiki instead of use TXP to document TXP!. He is, more or less, persuaded, once wikis are now one of the favourites spammers places. Other option is to use Hieraki, this rails app really rocks, and is focused on books, so… .
* * *
Textpattern Tag Manual Changelog · 8.06.04
June, 08 2004.
- Manual updated with the new γ1.19 version tags: The article related <txp:article_id />, <txp:article_image />, <txp:comments_count />, <txp:meta_keywords />, <txp:meta_author /> and the image tag <txp:thumbnail />
June, 06 2004.
- Added listform="" parameter for <txp:article /> (γ1.18 addition).
April, 12 2004.
- Complete documentation for page_title.
- Added Conditional Tags
- Added txp:notice tag
- The all in one archive now displays items properly inside their respective sections
April, 11 2004.
- Added this changelog.
- Added anchors to all tags for easy navigation from Index.
- Added image, image_index and image_display tags.
- Added feeds related tags: feed_link and link_feed_link.
To Do list:
- Add a section about plugins and tags they can provide.
Anything more which you want to see on this manual? [2]
* * *
Article Form Tags · 8.06.04
The next group of tags involves all tags which can appear inside an article form, determining the article parts that will be shown on our page, in function of the form we’re choosed to use for that article.
- <txp:title />: The title of the article.
- <txp:permlink></txp:permlink>: Permanent link to this article. Place inside the text you want to show inside this link.
- <txp:posted />: The date of the article, formated as specified on the “Date Format” or “Archive Date Format” on the “Admin>Preferences” screen.
- <txp:body />: the body of the article; that is, the article itself.
- <txp:author />: the article author name.
- <txp:category1 />: first category asigned to the article.
- <txp:category2 />: second category asigned to the article.
- <txp:section />: the section asigned to the article.
- <txp:excerpt />: the article excerpt, if any.
- <txp:article_id />: use this tag when you need to output the id of your article, (numeric value, used to univocally identify that article on the TXP Data Base). [Avaliable since γ1.19]
- <txp:article_image />: This tag allow us to show an image asociated with our article. To do this, we need to add the image url to our article putting its URL on the form field called Article image under the Advanced options for the article.
We’ve got 2 options to fill this field: If we add a number, (which must match one of your uploaded image numbers – the file name added by default to the uploaded images is a number, starting at 1 – under the TXP image section), we could use the XHTML attributes style and align with this tag, and the image tag created from this TXP tag will use the alt text you’ve added to the field Alternate text in your image section. We can also add directly an image URL – it doesn’t matter if this image hasn’t been added using TXP – and the <txp:article_image /> will simply output a XHTML image tag with that URL as src attribute. [Avaliable since γ1.19] - <txp:comments_count />: This tag will output the number of comments added to the current article.. If no comments were added, this tag will output NOTHING. [Avaliable since γ1.19]
- <txp:meta_keywords /> and <txp:meta_author />: These tags are intended to be used on the XHTML page head element, to display XHTML meta tags. In order to use them safely, you should place them inside a conditional <txp:if_individual_article>...</txp:if_individual_article>. [Avaliable since γ1.19]
- <txp:comments_invite />: this tag isn’t a simple invitation for your site users to post comments. It’s much more. If you place this tag in your page template, TXP will do different things in function of several conditions:
- If we’re on an article, where comments are disallowed, this tag will show nothing.
- If comments are allowed for the article:
- on pages with articles lists, this tag will show a link to the comment section on permanent page for the article,
- but on pages with a single article, it can show two different things, in function of the “Disabled after” time for comments has or not expired.
- If expired, it will show a comment listing of all published comments until the expiration date.
- If don’t expired, it will show also the comments editing form.
Comment [1]
* * *
Image Tags · 8.06.04
You can easily build your photo galleries using textpattern, even though image tags are not in TEXTPATTERN TAG BUILDER yet.
Next instructions are stolen directly from Textpattern Forum (thanks Dean):
First, you must upload fullsize images and corresponding thumbnails, and make sure each is in a specific category (keep the image category names simple: without spaces if possible, ‘newyear_2004’ for example).
To make an image gallery page:
- Create a new Page called something like ‘photo_page’
- Create a new section called something like ‘photo’, and tell it to use ‘photo_page’.
- In photo_page, put the tag <txp:image_index /> wherever you want the index to appear: a good idea would be to use a <div> and CSS to govern the space available for the index, and how the <img /> tags should be positioned.
- Wherever you want the fullsize image to appear on the page, put a <txp:image_display /> tag.
Then to call the gallery page (provided it is in the section ‘photo’), use:
your-txp-site.com/photo/?c=IMAGECATEGORY
At the same forum post you can find also 2 easy to use templates.
Now, a small description of these two tags:
The <txp:image_index /> tag
This tag will output a list containing all the thumbnails for a given category of images in our TXP installation. Of course, our images need to have a thumbnail, in order to display them on this index.
You can specify the attribute c to this tag in order to specify a default category for the images you want to display. If you don’t specify it, you need to pass to your image pages, at the end of the url, ?c=IMAGECATEGORY, where IMAGECATEGORY is the category of the images you want to show.
The <txp:image_display /> tag
Once we’ve created our image index, we can place this tag anywhere on the page, to show the image pointed by the thumbnails.
The <txp:thumbnail /> tag
[Avaliable since γ1.19]
Whith this tag we can output one of the thumbnails on our TXP image section anywhere in our pages. Of course, that thumbnails must exists in order to be displayed.
This tag can takes the next attributes:
- name: the name of our image in the TXP image section. [must be specified, if no id attribute present]
- id: the id of our image in the TXP DB. [must be specified if no name attribute present.]
- poplink: give this any not 0 value – for example poplink=”1” – if you want to create a link to a popup window with the image which thumbnail is asociated.
- This tag can takes also the XHTML attributes style and align.
Note that if both name and id attributes are present at once, the name value will override the id one.
Comment [2]
* * *
Article Related Tags · 6.06.04
The <txp:article /> tag
Being probably the most important of all TXP tags, the <txp:article /> tag is a single page column tag – due to it will appear on page templates – which will be replaced by one or more articles, depending on the context it is being processed.
If TXP detects we’re requesting a determinated article, it will show that article. Otherwise, it will show a list of articles.
Can take one or more of the following attributes:
- form: the TXP form used to format the article, which determines the parts of it that will be showed. For example, “lofi”, “default”, ..., if this attribute is omitted, the article form called “deafult” is used.
- limit: the number of articles to list. 10 by default, if this atrribute is omitted and we aren’t on a specific article page.
- listform: Starting from the γ1.18a version you can use this attribute in order to specify a different form to be used when we’re listing articles.
The <txp:article_custom /> tag
This is very similar to <txp:article />, and is intended to be used when a high degree of customization is required to show one or more articles. For this reason, it can take a lot of attributes:
- form: the TXP form used to format the article.
- limit: the number of articles to list.
- category: the category of the articles to show. By default, all categories will be included.
- section: the section of the articles to show. By default, all sections selected to be on front page will be included on front page, and only articles belonging to the section we’re on in the case of a section page.
- sortby:Criteria used to sorting articles. One of
- Posted: The date we asigned to the article. This is the default option if none is specified.
- Author: The author of the articles.
- Last Modification: The last updated articles.
- Title: Sort alphabetically using article titles.
- Section: Use the section of the articles to sort them.
- sortdir: one of “asc” or “desc” in function of we want to display articles – sorted by the previous criteria if specified – ascending (The first first) or descending (first the last one).
- excerpted: One of “y” or “n”, if we want to show only articles with or without excerpt.
- month: A month in the format “yyyy-mm” to specify to show only articles published at that month.
- keywors: A comma separated list of keywords?. If we specify this, only articles that matches those [all?] keywords on the correspondent field of the article, will be shown.
- listform: Starting from the γ1.18a version you can use this attribute in order to specify a different form to be used when we’re listing articles.
* * *
