Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
simple article status display problem, need help
Hi,
I’ve ran into this problem before and can’t get my head around it.
I want to display sticky blog articles in a left hand column through out the site, ok no problem there.
But on the blog page I can’t get the sticky articles to populate. i only want to display one article on the blog page at a time and I’m not sure how to do that when some of the articles are given the sticky status.
Here’s the article output on the blog page.
<div class="content">
<txp:if_individual_article>
<txp:article_custom limit="999" section="blog" />
<txp:else /><txp:article_custom section="blog" pgonly="0" form="home" limit="1" />
</txp:if_individual_article>
and here’s the list in the left hand column that displays on all sections of the site
<txp:article_custom form="c12" pgonly="0" section="blog" status="5" />
<txp:article_custom id="5" pgonly="0" form="c1" />
and here’s the complete article archive list in the blog page:
<txp:article_custom limit="999" form="blog_listing" section="blog" status="5" />
<txp:article_custom limit="999" form="blog_listing" section="blog" />
here’s a link to the in progress site’s blog page.
News
Any help is greatly appreciated. I’m under a bit of pressure to get this one finished.
edit: post edited to make code more readable.
Last edited by maniqui (2009-09-29 13:26:47)
its a bad hen that wont scratch itself.
photogallery
Offline
#2 2009-09-29 11:21:28
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: simple article status display problem, need help
Can’t it be the “status=“5” part?
Shouldn’t it be
status ="sticky"
?
Offline
Re: simple article status display problem, need help
Hi,
no i don’t think so. If you use the txp article output to generate the article tag and put sticky in the status dropdown it creates status=“5”
its a bad hen that wont scratch itself.
photogallery
Offline
#4 2009-09-29 11:28:08
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: simple article status display problem, need help
Hi,
Maybe I’m missing again something obvious?
Look here for the status attribute
Offline
Re: simple article status display problem, need help
hi redbot, yes I’m confused by that. If you use the article tag generator thingy in the admin it set’s status=5 when you choose sticky from the dropdown. But yes I know it says that in the documentation. Something simple I’m missing as well. -thanks
its a bad hen that wont scratch itself.
photogallery
Offline
#6 2009-09-29 11:49:26
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: simple article status display problem, need help
kvnmcwebn wrote:
… If you use the article tag generator thingy in the admin it set’s status=5 when you choose sticky from the dropdown. But yes I know it says that in the documentation…
You’re right, I never used the tag builder so I wasn’t understanding your point.
Anyway it seems like a little textpattern error/bug. Can someone confirm it?
Last edited by redbot (2009-09-29 11:50:13)
Offline
Re: simple article status display problem, need help
Though I don’t know the answer to why you can’t get the stickies to display, you can use either sticky
or 5
for the status
attribute and it’ll do the same thing.
P.S. Why are you using pgonly="0"
? Does it not default to 0 already? As an aside, the attribute is conspicuously missing from article_custom on Textbook — I guess it should be there…?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: simple article status display problem, need help
hi bloke,
yeah that pgonly just just generates automatically from the article generator, i’ve taken it out since.
redbot a bug? naw it must be something silly i’m doing.
its a bad hen that wont scratch itself.
photogallery
Offline
Re: simple article status display problem, need help
I had a similar but not exact problem like this before. If there was was a status=“any” attribute it would solve my problem but isn’t that supposed to be the default if you don’t declare a status anyway?
-best
kevin
its a bad hen that wont scratch itself.
photogallery
Offline
Re: simple article status display problem, need help
gonna have to take out the sticky feature for now. thanks for the feedback.
its a bad hen that wont scratch itself.
photogallery
Offline
Re: simple article status display problem, need help
Going to use this work around again.
http://forum.textpattern.com/viewtopic.php?id=31563
Still I’d like to know what I’m doing wrong with the sticky display at some point.
its a bad hen that wont scratch itself.
photogallery
Offline
Re: simple article status display problem, need help
I think the problem has something to to with using article_custom in the first condtion of this if else statment
<div class=“content”>
<txp:if_individual_article>
<txp:article_custom limit=“999” section=“blog” />
<txp:else /><txp:article_custom section=“blog” pgonly=“0” form=“home” limit=“1” />
</txp:if_individual_article>
I think you can only use a regular article tag for the first one like this:
bq. <div class=“content”>
<txp:if_individual_article>
<txp:article limit=“999” section=“blog” />
<txp:else /><txp:article_custom section=“blog” pgonly=“0” form=“home” limit=“1” />
</txp:if_individual_article>
its a bad hen that wont scratch itself.
photogallery
Offline