Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: How to get more txp:else options than just two?
Would it work to have a new section called ‘authors’, which contains one article for each author, filled will all the info you want to output for that author? That article could have the author name in a custom field or the keywords field, or could be authored by the author it’s referring to (since you can’t call an article by the title, which would be the logical place for the author name). Then you could call that article on the fly depending on the author of the article. Let’s see, in your article output form, you could include something like:
<txp:article_custom section="authors" form="author_bio" keyword[[or custom field or whatever]] = '<txp:author />' />
And then have whatever author info you want in the author_bio
form.
Offline
Re: How to get more txp:else options than just two?
Destry: Thanks for the hint on Stefs calendar. Found it myself yesterday, read the whole thread and the documentation and I am already poking Stefs thread with bad ideas :)
Stef, I remember from somewhere in your calendar thread where something like ras_author_list
and an txp:if_author
conditional was used. Ah, it’s a plug-in from rsilletti and was mentioned here:
<txp:ras_author_list wraptag="ul" break="li" label="Events by Author" labeltag="h3">
<txp:if_author name='<txp:ras_user />'>» </txp:if_author>
<txp:ras_author link="1" this_section="1" />
<txp:if_author name='<txp:ras_user />'>
<txp:smd_calendar size="large" stepfield="custom_1" omitfield="custom_2" section="events" author='<txp:ras_author />' />
</txp:if_author>
</txp:ras_author_list>
Maybe those ras_ plug-ins should be checked? Or rsilletti can provide such a mechanism?
The forum thread for ras_author_list
Oops, didn’t see the 2nd page. Mary, great idea. The same could be used for output_form
to get user descriptions?
Nora, another good idea
And don’t forget to use eg the hcard microformat :)
Last edited by merz1 (2009-02-14 17:27:13)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: How to get more txp:else options than just two?
Nora,
Thanks for pitching in. That might work, I don’t know, but not one I think I would use here because in addition to not wanting to make the authors do anything more than necessary, I also don’t want to make the site admin do anything more than necessary either. :)
In this case, creating the extra section and a unique article for each passing author would be slightly overkill. I’m also not keen on using articles for structure, per se, which is how that kind of sounds.
Offline