Difference between revisions of "Issue:Dynamic offset to pages"
Line 12: | Line 12: | ||
If you first open the page | If you first open the page | ||
− | http://www. | + | http://www.mywiki.com/wiki/MyDynamicPage |
You will get the offset specified by the <nowiki><DPL>offset=0|count=100</DPL></nowiki>, in this case is zero | You will get the offset specified by the <nowiki><DPL>offset=0|count=100</DPL></nowiki>, 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 | 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. | + | http://www.mywiki.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. | This page knows its offset and can print forward and back links. This is how I grabbed the doffset in your class. |
Revision as of 05:41, 23 May 2009
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.mywiki.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.mywiki.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?