Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-20 00:49:04

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

using prev / next with wraptags or labels (if data)

If one uses the following structure:

<p class="leftnav"><txp:link_to_prev><span>Previously:</span><txp:prev_title /></txp:link_to_prev></p>
<p class="rightnav"><txp:link_to_next><span>Next in Line:</span><txp:next_title /></txp:link_to_next></p>

One will end up with a single <p> tag in the case of either no “next” or no “prev” title and the labels will be linked and have to be styled in such a way that they don’t show “clickability” so as to not confuse the user, or be poor design.

If one uses the following structure:

<p class="leftnav">Previously:<txp:link_to_prev><txp:prev_title /></txp:link_to_prev></p>
<p class="rightnav">Next in Line:<txp:link_to_next><txp:next_title /></txp:link_to_next></p>

One is left with a label that corresponds to nothing if the case is either of those listed above.

Does anyone have an instance where this could be handled differently? More cleanly?
Should wraptag, label, and linkclass attributes be added to the <txp:link_to_next> and <txp:link_to_prev> tags?
Any thoughts or ideas?

Matthew


Offline

#2 2007-04-12 14:41:48

anthonybooth
Member
From: UK
Registered: 2007-01-13
Posts: 21
Website

Re: using prev / next with wraptags or labels (if data)

Hello Matthew

Don’t know if you managed to find a solution but just to let you know I have knocked up a plugin today for someones site to deal with this problem.

If you need it then Download

There may be alternatives and better solutions but I’m still new to txp so I find writing plugins a useful excercise.

Anthony


Forever learning.

Offline

Board footer

Powered by FluxBB