Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: stm_article_order: Arbitrary sort order for your articles
Does this plugin still have issues with underscores?
Offline
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
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
Re: stm_article_order: Arbitrary sort order for your articles
Anyone up for a challenge?
Offline
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
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 examplesort="custom_1"
) and then the first 8 should be the ones you want? Although since it’s sorting alphabetically, you might needsort="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
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
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
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
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
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
Re: stm_article_order: Arbitrary sort order for your articles
Looking for someone to edit this is possible – see thread here
Offline