Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-06-01 14:44:27

moloko
Member
From: USA
Registered: 2005-05-25
Posts: 35
Website

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

#2 2005-06-01 16:40:40

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

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

#3 2005-06-01 17:06:55

moloko
Member
From: USA
Registered: 2005-05-25
Posts: 35
Website

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

#4 2005-06-01 17:47:18

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

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

#6 2005-06-02 17:46:05

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

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

#8 2005-06-02 22:25:23

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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.

Offline

#9 2005-06-04 00:51:26

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

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

#10 2005-06-04 23:37:14

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: Article on index page only.

Your right, that is when the ob1_if_section comes in handy.

Offline

#11 2005-06-04 23:44:41

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

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

Board footer

Powered by FluxBB