Textpattern Forum

You are not logged in. Register | Login | Help

#1 2005-11-03 14:21:04

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,099
Website

djw_section_articles

djw_section_articles v0.6.3
Lists articles out of a given section.

Created by David Woodward. As David is no longer actively developing and supporting his plugin, we both have agreed that I would host and maintain it.

Last edited by wet (2005-11-19 20:23:48)

Offline

#2 2005-11-03 17:53:05

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: djw_section_articles

Can’t we do that with txp:article_custom ?

Offline

#3 2005-11-03 19:21:22

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,099
Website

Re: djw_section_articles

I suppose djw_section_articles could be imitated with a combination of

<h2><txp:section name="foo" link="1" title="1" /></h2>
<ul><txp:article_custom section="foo" category="bar" link="1" form="permlink" /></ul>

permlink being a form like

<li><txp:permlink><txp:title /></txp:permlink></li>

One minor difference: djw_section_article does not output the section title and link when a section contains no articles. It’s mainly a matter of preferences: one line plugin tag versus some more lines of core tags. It will neither increase nor reduce db calls, I suppose, so page rendering time and cpu load will not differ a lot.

Offline

#4 2005-11-03 19:30:11

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: djw_section_articles

Ok I missed the label included in the plugin output… can be nice, thanks Wet.

Offline

#5 2005-11-18 06:34:04

rbl
Member
From: Portugal
Registered: 2004-02-25
Posts: 40

Re: djw_section_articles

Wet, is it possible to tweak this to exclude the current article from the list?

Offline

#6 2005-11-19 20:21:52

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,099
Website

Re: djw_section_articles

Done. Setting current="0" will suppress the link to the current article.

Last edited by wet (2005-11-19 20:22:27)

Offline

#7 2005-11-24 18:41:54

rbl
Member
From: Portugal
Registered: 2004-02-25
Posts: 40

Re: djw_section_articles

Wet, is there any way to make djw_section_articles care for nck_olm or sgb_url_handler?
In a couple of my sections I use a different url mode and need to change the way djw_section_articles builds urls.

Offline

#8 2005-11-24 18:45:59

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,099
Website

Re: djw_section_articles

Sorry, it will not. djw_section_articles is currently using txp’s core functions for building article links. I’d rather keep it that way to avoid introducing cross dependencies besides the ones introduced by txp’s own evolution.

Offline

#9 2005-11-24 18:51:24

rbl
Member
From: Portugal
Registered: 2004-02-25
Posts: 40

Re: djw_section_articles

Ok, I can understand that but is there any way to hack it (even if it is an ugly one) to change the way the url is built?

Offline

#10 2005-11-24 18:58:01

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,099
Website

Re: djw_section_articles

There is, of course.

Find this line in the current version of the plug-in code:

$out[] = tag($Title,'a',' href="'.permlinkurl_id($thisid).'"');

and replace the call to permlinkurl_id($thisid) to anything which inserts the desired URL. $thisid contains the article’s numeric id. Voilà.

Last edited by wet (2005-11-24 18:59:32)

Offline

Board footer

Powered by FluxBB