Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Article on index page only.
I want to make a intro article that will be placed in a DIV on the main page. I do not what it to show on any other page. I am having difficultly doing this.
Offline
Re: Article on index page only.
This should work:
<code>
<txp:doArticle id=“232” />
</code>
Where 232 is the id of the article you want to show. Then tuck that article away somewhere where it can not be found manually (meaning a section that does not get searched) and voila. Achieved goal!
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
Re: Article on index page only.
Ok. Got all that. Made a new section this is checked for main page and non-searchable. Looks like it is working. Thanks. This is not in the textbook guide.
Why would I use doArticle instead of just article?
(just trying to learn the ins and outs)
Offline
Re: Article on index page only.
Hmm .. Does article nowadays support id
? I’ve been away so haven’t really kept up with the TXP development for almost six months so. Might work with txp:article id=”“ too ..
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
#5 2005-06-01 21:24:37
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Article on index page only.
Yeah, we don’t use doarticle anymore, just
<txp:article_custom id="" />
Offline
Re: Article on index page only.
I learn something new everyday right now. Lovely. But only article_custom not article?
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
#7 2005-06-02 20:09:08
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Article on index page only.
Yes, for article it works too.
Offline
Re: Article on index page only.
What about setting the article to sticky and doing: <code><txp:article status=“sticky” /></code> that way you aren’t limited to just that specific article id.
Just another option.
Refresh Dallas and other Refreshing Cities.
Offline
Re: Article on index page only.
tinyfly,
Well, if moloko then adds more then one sticky article to other sections then the “hidden” one there will be a problem on the main page, right?
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
Re: Article on index page only.
Your right, that is when the ob1_if_section comes in handy.
Refresh Dallas and other Refreshing Cities.
Offline
Re: Article on index page only.
Hehehehehe .. Watch my fingers with that ruler tinyfly!
Here I am preaching and I’ve done a plugin that can solve it. Lovely ;)
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
#12 2005-06-05 00:36:15
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Article on index page only.
You should be able to use both the id=123
and status=sticky
attributes simultaneously. Setting the articles to Sticky status will keep them out of the regular article lists, and id
will let you select which one to display on the front page.
Also, <txp:article status=sticky />
ought to respect the ‘On Front Page’ setting for each section. If you have On Front Page set to No, then sticky articles in that section won’t (shouldn’t – I haven’t tested this) show up on the front page.
Alex
Offline