Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-15 14:13:24

qwallis
Member
From: Köln Germany
Registered: 2006-03-13
Posts: 17
Website

permanent links in sections problem

Hello, I have created a section called “news” for my site, in which articles posted to that section display as expected (the section uses a clone of the default page template, with just a couple of basic html differences).
The permanent links from the default section (i.e. the landing page) are fine, but the permanent links from the news section produce duplicated results (the same article twice) with the link forward and back after the second edition of the same article.

Any thoughts?

Offline

#2 2006-03-15 21:58:11

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: permanent links in sections problem

Looks like you have two <txp:article /> tags on your News page template.


Alex

Offline

#3 2006-03-16 00:35:23

qwallis
Member
From: Köln Germany
Registered: 2006-03-13
Posts: 17
Website

Re: permanent links in sections problem

Yes I sussed out that it was something to do with that. So does that mean one can’t Break an article list into columns, or insert ads between certain articles in a list using “pageby” in a section, other than default, along with the article tag? I guess it may be obvious to people who are up to speed with textpattern; I have only been using it a couple of days now.

I have sorted it out now using <code> <txp:if_individual_article> and <txp:if_article_list> </code> and don’t seem to have cause any other problems, fingers crossed.

thanks

I have another “Troubleshooting” issue, but I’ll start another thread for that.

Offline

#4 2006-03-16 00:42:42

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: permanent links in sections problem

Can you post an example of the code that was causing the double article please?


Alex

Offline

#5 2006-03-16 10:25:52

qwallis
Member
From: Köln Germany
Registered: 2006-03-13
Posts: 17
Website

Re: permanent links in sections problem

What I had, which gave me the problem was:

<code><txp:article limit=1 pageby=3 /></code>

Google adsence code

<code><txp:article limit=2 offset=1 pageby=3 /></code>

<code><txp:if_individual_article ></code>

<code><txp:link_to_prev><txp:prev_title /></txp:link_to_prev></code>
<code><txp:link_to_next><txp:next_title /></txp:link_to_next></code>

<code></txp:if_individual_article></code>

<code><txp:if_article_list></code>

<code><txp:older>previous</txp:older></code>
<code><txp:newer>next</txp:newer></code>

<code></txp:if_article_list></code>

Which is basically, I thought, what was suggested. But in my news section (and I guess any other section other than default), when a permanent link was clicked it produced the article twice with an ad just under the first’s comment form.

What I have now which works as I wanted is:

<code><txp:if_article_list></code>

<code><txp:article limit=1 pageby=3 /></code>

Google adsence code

<code><txp:article limit=2 offset=1 pageby=3 /></code>

<code></txp:if_article_list></code>

<code><txp:if_individual_article></code>
<code><txp:article from=“Single” /></code>
<code></txp:if_individual_article></code>

<code><txp:if_individual_article ></code>

<code><txp:link_to_prev><txp:prev_title /></txp:link_to_prev> </code>
<code><txp:link_to_next><txp:next_title /></txp:link_to_next></code>

<code></txp:if_individual_article></code>

<code><txp:if_article_list></code>

<code><txp:older>previous</txp:older></code>
<code><txp:newer>next</txp:newer></code>

<code></txp:if_article_list></code>

which puts an if_article_list around the article break code and a form is specified if_individual_article etc

This may be a very cak-handed way round the problem, in which case I would welcome some pointers, but I was was very happy that sitting up into the small hours last night at least made me feel that I had moved forward a little.

Cheers.

Last edited by qwallis (2006-03-16 10:27:45)

Offline

#6 2006-03-16 17:51:39

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

Re: permanent links in sections problem

This may be a very cak-handed way…

Nope, that’s the proper way to do it. :)

Offline

Board footer

Powered by FluxBB