Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-06-03 11:48:02
- stellaris
- Member
- Registered: 2008-03-06
- Posts: 19
Display posted/last-modified date in <txp:related_articles />?
Hi,
I am successfully using <txp:related_articles> to show a list of related articles based on CAT1 oder CAT2. Now I’d like to display the posted/last-modified date next to each related article in the output list, but I haven’t found a solution to that as of yet.
I searched for plugins too and found chh_related_articles, but it doesn’t seem to provide the functionality I am after either. I am currently looking through that plugin’s code and textpattern’s itself, but I am not the hottest PHP crack.
Edit: Maybe chh_related_articles does do the trick by outputting a form-based article listing. Looking into that.
I’ll gladly accept any hints, tipps and links to towards a possible solution. If you need more info, please let me know.
Last edited by stellaris (2008-06-03 12:23:22)
Offline
#2 2008-06-03 12:49:44
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Display posted/last-modified date in <txp:related_articles />?
yup, chh_related_articles has “output form”. And there’s ob1_modified.
Last edited by uli (2008-06-03 12:51:55)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Display posted/last-modified date in <txp:related_articles />?
<txp:related_articles form="myform"/>
If you’re not running svn, copy the related_articles function from textpattern/publish/taghandlers.php. Then add jmd_modified to myform:
<txp:title/> (<txp:jmd_modified/>)
Offline
#4 2008-06-03 13:30:09
- stellaris
- Member
- Registered: 2008-03-06
- Posts: 19
Re: Display posted/last-modified date in <txp:related_articles />?
Hi jm,
thanks for the tip! I replaced the function, installed the plugin, added a form and the jmp_modified tag to that form, yet I am getting an error/notice displayed on the page:
tag_error <txp:related_articles section=“ausbildungsplaetze” class=“aehnliche-stellen” form=“aehnliche-artikel” /> -> Textpattern Notice: Unbekanntes Tag-Attribut: form on line 653
Logged out of txp and restarted the webserver/database, too, same effect. Any idea?
Offline
#5 2008-06-03 14:00:01
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Display posted/last-modified date in <txp:related_articles />?
Instead of related_articles I think you could successfully use the new plugin smd_query
Offline
#6 2008-06-03 15:02:27
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Display posted/last-modified date in <txp:related_articles />?
Wouldn’t article_custom work with asy_wondertag?
<txp:asy_wondertag>
<txp:article_custom category="<txp:category1 />,<txp:category2 />" form="yourform" />
</txp:asy_wondertag>
Offline
#7 2008-06-03 16:06:18
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Display posted/last-modified date in <txp:related_articles />?
Offline