Issue:Dynamic offset to pages

From FollowTheScore
Revision as of 05:40, 23 May 2009 by Ahutch (talk | contribs)
Jump to: navigation, search
Description: Can you add a dynamic page offset to your class?
Extension / Version: DPL   /   Latest
Type / Status: Change Request   /   open

Problem

I have just started using DLP and like it a lot. However I do not like DLP example 13. I was wondering why you don't add this feature to your class. It should be fairly simple if you use the same method as the Category page.

If you first open the page

http://www.youserguide.com/wiki/MyDynamicPage You will get the offset specified by the <DPL>offset=0|count=100</DPL>, in this case is zero

Then if there are additional pages to show (query one more than you plan to display), you could add a link to the bottom to select the page http://www.youserguide.com/mediawiki/index.php?title=MyDynamicPage&doffset=100

This page knows its offset and can print forward and back links. This is how I grabbed the doffset in your class.

       $_sOffset = self::$options['offset']['default'];
       $iOffset  = ($_sOffset == ) ? 0: intval($_sOffset);
       global $wgRequest;
       $_doffset  = $wgRequest->getVal( 'doffset' );
       $iOffset = ($_sOffset == ) ? $iOffset: intval($_doffset);

Is this something you would consider adding?


Reply