Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-11-24 09:25:56

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 811
Website

link_to_next/link_to_prev not working

<h3><txp:permlink><txp:title /></txp:permlink> <txp:link_to_next >next</txp:link_to_next > <txp:link_to_prev >prev</txp:link_to_prev ></h3> <txp:body /> </div>

Why is the above form (next and prev links) not working in my ‘articles’ template? The article content has disappeared too > www.joopvos.nl/txp/index.php?id=34

<txp:article limit="1" form="articles" />

Thanks for helping me!

(Edit: updated discussion topic. -Mary)

Last edited by Mary (2007-11-24 11:46:36)

Offline

#2 2007-11-24 09:52:56

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: link_to_next/link_to_prev not working

i’m pretty sure link to next and link to prev are supposed to go in your page(s). it doesn’t make sense to put them in an article form.

Offline

#3 2007-11-24 11:46:04

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

Re: link_to_next/link_to_prev not working

Yep.

Articles are showing for me.

Offline

#4 2007-11-24 14:36:43

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 811
Website

Re: link_to_next/link_to_prev not working

Mmm, strange … because this form works … !? … >

<div class="article"> <h3 class="title"><txp:permlink><txp:title /></txp:permlink></h3> <h3 class="newold"><txp:link_to_next showalways="1">newer article</txp:link_to_next> | <txp:link_to_prev showalways="1">older article</txp:link_to_prev></h3> <txp:body /> </div>

Look at > www.joopvos.nl/txp/index.php?id=33

Offline

#5 2007-11-24 14:53:45

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: link_to_next/link_to_prev not working

i’m pretty sure link to next and link to prev are supposed to go in your page(s). it doesn’t make sense to put them in an article form.

Yep, I’m thinking the same, as like iblastoff. You should definitely but them to your page template or another form. You could just wrap them with if_individual_article, you know.

And after all your using XHTML wrong. As we know, titles are just for titles, and as far I see newer and older article ain’t correct content for h3. SEO won’t like it at all.

Cheers!

Last edited by Gocom (2007-11-24 14:54:20)

Offline

#6 2007-11-24 16:09:44

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

Re: link_to_next/link_to_prev not working

Excuse me, you can use link_to_prev and link_to_next in an article form (will work only when in individual article mode), or on the page, wrapped in if_individual_article tags.

Don’t see why it wouldn’t work though… Have you tried removing the limit attribute?

Offline

#7 2007-11-24 16:56:39

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 811
Website

Re: link_to_next/link_to_prev not working

Oh boy! The spaces (behind prev and next in the tags!) were the troublemakers! See the code in the entry of this thread. So indeed it is possible and it can be put in a form! But what about the XHTML issue!?

Oops! I didn’t look down the viewport … it’s a mess … :(

Last edited by RedFox (2007-11-24 17:00:25)

Offline

#8 2007-11-24 17:28:28

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: link_to_next/link_to_prev not working

Excuse me, you can use link_to_prev and link_to_next in an article form (will work only when in individual article mode), or on the page, wrapped in if_individual_article tags.

Yeah, I know you can use them inside form (article, misc, link and file are the same – they are just included in different list at backend) but there is just not a freaking point to use them inside article as a title – that was my point.

But what about the XHTML issue!?

Well, h3 is a title as I said. The prev and next links aren’t title-content, just the article’s title is. If you but that to the title, google and other searchengines will threat it kinda a grappy way. In example SEO dosn’t like doubled h3, as same level, so basically now your articles title is newer article | older article – “look more at the next article and previous article” :wink: :wink: :P ‘.

Something to say:

  • <meta name=“MSSmartTagsPreventParsing” content=“true” /> like made-up metas, for MSIE – like & love – nah, cuz.
  • If you haven’t main header, h1, nor h2, why are you using h3? If you haven’t those, what up to use level three? But h1 is for the main header – for ie. site name, so that first and then h2 ;)
  • Good way of using default textpattern’s default template as the start-out – and lefting the accessability there, after removing the id-elements that it is referring. No point of that.

Cheers!

Offline

#9 2007-11-25 13:31:19

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 811
Website

Re: link_to_next/link_to_prev not working

Thanks to everyone for contributing. I’ve learned a lot.

Offline

Board footer

Powered by FluxBB