Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
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