author
From Textpattern CMS User Documentation
<txp:author />
The author tag is a single tag that is used to return the name of the author of the currently displayed article.
Contents |
Attributes
Tag will accept the following attributes (case-sensitive):
- link="boolean"
- Make text a link to the author's posts.
- Values:
0(no) or1(yes). - Default:
0. - section="section name"
- Only link to articles from the named section.
- Default: unset.
- this_section="boolean"
- Only link to other articles from the same section as the current article.
- Values:
0(no) or1(yes). - Default:
0. - title="boolean"
- Whether to display the author's real name (1) or login name (0).
- Default: 1.
Examples
Example 1: Link to list of author's articles
The author's name in this article form is a hyperlink to a list of articles by this author.
<h1><txp:title /></h1> <txp:body /> <p class="author-date"> Posted By: <txp:author link="1" /> @ <txp:posted /> </p>
Other tags used: posted, title, body
Example 2: Author landing page
Display the author's name above a list of articles by that author when visiting site.com/author/Author+Name URLs.
<txp:if_author> <h1>Articles by author: <txp:author /></h1> <txp:article form="article_listing" limit="5" /> </txp:if_author>
Other tags used: if_author, article
Genealogy
Version 4.5.0
- Permitted the tag to be used on author list landing pages
Version 4.3.0
- Added the
titleattribute.
Version 4.0.4
-
section,this_sectionadded.




