Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-01-18 16:53:59
- keavy
- New Member
- Registered: 2004-10-08
- Posts: 4
list of article titles by the current article's author
I’d like to do this:
<txp:article_custom form="lofi" author="Parkling" />
but where the author attribute is dynamic, so it uses the authorId of the current article’s author. So that on an individual article page, I can also display a link of titles to articles by the current article’s author.
How do you achieve that?
Thanks
Offline
Re: list of article titles by the current article's author
This might work, albeit untested (not sure you are allowed to use article tags inside of article tags, which is kinda naughty). Include the following in your article form (in this case “lofi”)
Anyone else… Are you permitted to call article custom in an article form?
It makes use of asy_wondertag
<txp:if_individual_article>
<txp:asy_wondertag>
<txp:article_custom author="<txp:author/>"/>
</txp:asy_wondertag>
</txp:if_individual_article>
Last edited by mrdale (2007-01-18 18:53:41)
Offline
#3 2007-01-18 19:01:24
- keavy
- New Member
- Registered: 2004-10-08
- Posts: 4
Re: list of article titles by the current article's author
Thanks, yes that’s what I’d tried – but nothing is output.
I think, if that produced output at all, it that txp:author would product the full name, whereas the static version allows you to specify an authorId.
if there’s a way to obtain the authorId, for the current article, I could do that with PHP – but I wasn’t sure how you could obtain that.
Offline
#4 2007-01-18 20:40:14
- anoke
- Archived Plugin Author
- Registered: 2006-04-15
- Posts: 152
Re: list of article titles by the current article's author
In page (not in article form):
<txp:if_individual_article>
<txp:article form="article_single"/>
<txp:asy_wondertag>
<txp:article_custom form="wondertag_test" author="<txp:php>echo $GLOBALS['thisarticle']['authorid'];</txp:php>"/>
</txp:asy_wondertag>
</txp:if_individual_article>
In “wondertag_article_links” I had only permalinks.
Messyyyy IMHO.
- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -
Offline