Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-08 22:38:07

ivnj
Member
Registered: 2007-02-04
Posts: 20

More than 1 static?

I finally got static pages working.

If I use regular non static pages I see the home page and the next or previous. And ech article is ?pg=2, ?pg=3, pg=4, etc.

If I have it static like when I click on Contact Us I don’t see ?pg=2. I only see the most recent article linked to that section and no Next or Previous. Is static only designed to show 1 artice. And if I make 2 sticky articles to that section I’d only be allowed to see 1 article. Or can I have 2 sticky and just link to both so both stay in the same section. Like have a next link and then ?stickypage=2.

I could use live and not sticky but it shows on the main site with all the other articles and does not remain in 1 section I specify.

Or can I just use live and have order articles differently.

The issue is if I make “Article1”, “Article2”, etc.

“Article1” becomes ?pg=2. When I make “Article2” it becomes ?pg=2 and “Article 1” becomes ?pg=3.

I don’t want new articles to go to the front. I want “Article1” to be ?pg=2.

And when I write “Article2” it should be ?pg=3 and “Article1” should remain ?pg=2.

Instead of changing page numbers everytime I write a new srtice. I t makes it hard to write links and link them to ?pg=2 if page 2 changes to a different artice everytime I write a new one.

Thanks,
ivnj

Offline

#2 2007-02-08 23:51:54

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: More than 1 static?

txp:article: have a look at the limit and sort attributes.

Instead of handcoding links to pages, use txp:permlink.

It might also be good to read something (don’t forget the links at the bottom of that page) about Textpattern first, it will help you find a way to structure your site.

Offline

#3 2007-02-09 01:02:39

ivnj
Member
Registered: 2007-02-04
Posts: 20

Re: More than 1 static?

sort=“posted asc”/> or sort=“posted desc”/> works great.

Here’s the problem. If I goto my main site. It says Article 1, Article 2, Article 3, etc.

And it says ID 29, 28, 21. And if I add new articles it says ID 30, 31, 32, etc.

But asc or desc doesn’t order the articles by ID number. Or even without sort command it never sorts by article ID. It goes by newest added article and not by ID number.

So the order is article 29, 28, 21, 27. It should be 26, 27, 28, 29. Not 29, 28, 21, 27.

But the articles always order by the order on the list. Newest article fist and so on.

So on the very left I 29, 28, 21, 27. Not 26, 27,28, 29. So it’s confusing.

And when people bookmark ?pg=2 for example and then go back a few days later and see it’s changed to another aticle they’ll get confused.

Thanks,
ivnj

Last edited by ivnj (2007-02-09 01:04:09)

Offline

#4 2007-02-09 02:24:22

ivnj
Member
Registered: 2007-02-04
Posts: 20

Re: More than 1 static?

sortby=“id” works great. Now everything sorts by ID. Not by order of title. But everytime I add a new article it still changes the article.

Like Article 1 = ?pg=2. But if I add a new article it becomes ?pg=3. It doesn’t stay on 2.

Thanks,
ivnj

Offline

#5 2007-02-09 05:00:44

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: More than 1 static?

Each article is not ?pg=2, etc; that is each article list page, each page showing the number of articles as set by the limit attribute of the article tag.

Offline

#6 2007-02-09 05:32:38

ivnj
Member
Registered: 2007-02-04
Posts: 20

Re: More than 1 static?

Then how do I AHREF directly to the article and not the page number.

Thanks,
ivnj

Offline

#7 2007-02-09 06:29:04

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: More than 1 static?

The permlink tag (linked above).

Offline

#8 2007-02-09 06:56:23

ivnj
Member
Registered: 2007-02-04
Posts: 20

Re: More than 1 static?

Ok I get it now.

Thanks,
ivnj

Offline

Board footer

Powered by FluxBB