Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2008-11-18 20:57:46

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

Re: stm_article_order: Arbitrary sort order for your articles

Does this plugin still have issues with underscores?

Offline

#26 2009-01-23 19:55:08

vaughn-taylor
Member
From: New Orleans
Registered: 2004-08-06
Posts: 17
Website

Re: stm_article_order: Arbitrary sort order for your articles

I’m not sure if this thread is dead, but I will give this a shot.

I’m trying to use the following: <txp:article_custom form=“link_list_popular” pgonly=“0” limit=“8” sort=“position asc” />

The form “link_list_popular” then weeds out the articles that don’t have a custom field set to “yes” — like this:

<txp:if_custom_field name=“directory_popular” val=“yes”>
<li><txp:permlink><txp:title /></txp:permlink></li>
</txp:if_custom_field>

The problem is that I’m only getting the first 2 out of 8 articles that have the custom field set. However, when I set the article limit to 38, I get all 8 articles — like this.

<txp:article_custom form=“link_list_popular” pgonly=“0” limit=“38” sort=“position asc” />

I initially thought it was because the target articles were not sorted sequentially. In other words, I had them sorted like this:

Article 1 (target)
Article 2
Article 3
Article 4 (target)
etc…

So, I reordered them so they were sequential:

Article 1 (target)
Article 4 (target)
Article 2
Article 3

To no avail. I still need to set the article limit to 38 to see all 8 target articles.


Work until your carpal tunnel makes you cry.
—————————-
My “bloggy” TP site >> liberalrevolt.com

Offline

#27 2009-01-23 21:16:35

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: stm_article_order: Arbitrary sort order for your articles

Hi Vaughn,

It’s a problem with restricting output of <txp:article> or <txp:article_custom> from a form.

When you set limit= in <txp:article_custom> The limit is not on how many times it successfully finds the “directory_popular” value set to “yes”, but the limit of total articles to go through.

So it you set limit="8" that means go through the first 8 articles that meet the criteria you set in your <txp:article_custom> tag.

Your article form is then restricting the display of those 8 articles to only those with the “directory_popular” value set to yes.
So that’s why you only see 2 articles….and why you have to set your limit higher to get output you are after.

I don’t know if you can use custom_fields to accomplish what you’re after.


Tom

Offline

#28 2009-02-02 18:42:24

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: stm_article_order: Arbitrary sort order for your articles

Anyone up for a challenge?

Offline

#29 2009-02-02 20:39:49

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

Re: stm_article_order: Arbitrary sort order for your articles

Vaughn -
Might it work to sort the article_custom call by the custom field (for example sort="custom_1") and then the first 8 should be the ones you want? Although since it’s sorting alphabetically, you might need sort="custom_1 desc" since “no” comes before “yes”.

Offline

#30 2009-02-02 20:54:21

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: stm_article_order: Arbitrary sort order for your articles

nabrown78 wrote:

Vaughn -
Might it work to sort the article_custom call by the custom field (for example sort="custom_1") and then the first 8 should be the ones you want? Although since it’s sorting alphabetically, you might need sort="custom_1 desc" since “no” comes before “yes”.

Nice. I hadn’t thought of that – could be a nice way to provide clients with a “show on homepage” checkbox if it works as expected.


Tom

Offline

#31 2009-04-02 14:45:41

alanfluff
Member
From: Ottawa, Canada
Registered: 2008-09-15
Posts: 222
Website

Re: stm_article_order: Arbitrary sort order for your articles

Lovely plugin. Working for me like a charm in 4.0.8 — to make my nav order too I of course output it with the:

sort=“position asc”

Happy bunny _


At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A

Offline

#32 2009-05-01 05:45:54

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: stm_article_order: Arbitrary sort order for your articles

What does this mean? > Notice: Undefined index: REQUEST_URI in D:\www\waterlijf.nl\www\txp\textpattern\lib\txplib_misc.php(570) : eval()’d code on line 50

Offline

#33 2009-07-24 23:15:14

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: stm_article_order: Arbitrary sort order for your articles

The menus are jumping all around the page when I are try to drag and drop articles. The section divs are really jumpy and articles keep landing in the wrong sections when I drag them. I’ve tried it on Safari and Firefox on a Mac. I would love to use this plugin, but the problem is bad enough that I probably have to do without. Does anyone else have the same problem?

Offline

#34 2009-07-25 02:52:54

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: stm_article_order: Arbitrary sort order for your articles

Yeah. It’s a bit tricky sometimes. Try adjusting the CSS a bit so that there is more top/bottom padding. I don’t have an install handy or I’d check exactly where you do that — you might have to edit the plugin.

Last edited by renobird (2009-07-25 02:54:18)

Offline

#35 2009-08-10 09:13:55

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: stm_article_order: Arbitrary sort order for your articles

I love this plugin, one of the best for handing over sites to clients :)

Has anyone got it to work with sed_section_fields so I can hide sections?

Offline

#36 2009-08-14 01:17:27

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: stm_article_order: Arbitrary sort order for your articles

Looking for someone to edit this is possible – see thread here

Offline

Board footer

Powered by FluxBB