Issue:Category:New format symbols: %PREV% and %NEXT%

From FollowTheScore
Jump to: navigation, search
Description: %PREV% returns "previous XX", %NEXT% returns "next XX"
Extension / Version: DPL   /   ?
Type / Status: Change Request   /   closed

Problem

I absolutely fail setting up a template for navigating through a long result list. It would be very handy to just use %PREV% and %NEXT% in the resultsheader or resultsfooter. They sinply return "previous XX" and "next XX" and can be freely formatted by the user, e.g. to addapt the wiki style (previous 200) (next 200) or create an own style.
They are only linked if there is something to navigate to.

As long as you can't use %PAGES% or {{{%PAGES%}}} inside {{#ifexpr: or {{#expr: it's impossible to set up logical prev / next links, esp. since you may also want to use %PAGES% and %TOTALPAGES% together which is another bug.

Btw: Does a working template exists here as example? Didn't find any. Please let me now.


Reply

Ok I found out how to use %PAGES% or %TOTALPAGES% in parser functions, still an easy %PREV% and %NEXT% may be good. Feel free to close this issue. --Subfader 11:18, 9 May 2009 (UTC)

Reply 2

You can find an example in DPL Example 013

Gero 15:27, 9 May 2009 (UTC)

That looks fine. Thanks. It was about time for such an example imo :) When I finished mine I'll let you know my example which adapts the (previous 200) (next 200) style of MW standard lists. It will be a single template with close to no extra code in the dpl code and which you can use over & over again on multiple dpl lists. Atm my website is offline though. --Subfader 15:40, 9 May 2009 (UTC)
Fine, examples for best practice of DPL use are always welcome.. Gero 15:48, 14 May 2009 (UTC)