PHP Pear Pager and $pager->linkTags [message #170738] |
Wed, 17 November 2010 21:01 |
Chris Percol
Messages: 5 Registered: November 2010
Karma: 0
|
Junior Member |
|
|
I am using pear package pager 2.4.8 on PHP 5.2.14 and can't get $pager-
> linkTags to work yet $pager->links works no problem?
Anybody any thoughts?
Thanks,
Chris
|
|
|
Re: PHP Pear Pager and $pager->linkTags [message #170739 is a reply to message #170738] |
Wed, 17 November 2010 21:03 |
Chris Percol
Messages: 5 Registered: November 2010
Karma: 0
|
Junior Member |
|
|
On Nov 17, 9:01 pm, Chris Percol <chris.per...@gmail.com> wrote:
> I am using pear package pager 2.4.8 on PHP 5.2.14 and can't get $pager-
>
>> linkTags to work yet $pager->links works no problem?
>
> Anybody any thoughts?
>
> Thanks,
>
> Chris
Apologies, should have included code.
<?php
require_once 'Pager/Pager.php';
$data = range(1, 4); //an array of data to paginate
$params = array(
'mode' => 'Sliding',
'append' => false,
'path' => '',
'fileName' => 'javascript:HTML_AJAX.replace(\'target\',\'data.php?
pageID=%d\');',
'perPage' => 1,
'delta' => 1,
'itemData' => $data,
);
$pager = & Pager::factory($params);
$links = $pager->getLinks();
echo '<p>This container is loaded with an AJAX call</p>';
echo '<p><span class="datetime">DateTime: '. date('Y-m-d H:i:s') .'</
span></p>';
echo '<h3>Page '. $pager->getCurrentPageId() .'</h3>';
foreach ($pager->getPageData() as $item) {
echo 'Item '. $item .'<br />';
}
echo '<hr />'.$pager->linktags;
?>
|
|
|
Re: PHP Pear Pager and $pager->linkTags [message #170741 is a reply to message #170739] |
Wed, 17 November 2010 21:53 |
Helmut Chang
Messages: 22 Registered: September 2010
Karma: 0
|
Junior Member |
|
|
Am 17.11.2010 22:03, schrieb Chris Percol:
>> I am using pear package pager 2.4.8 on PHP 5.2.14 and can't get
>> $pager-> linkTags to work yet $pager->links works no problem?
....
> Apologies, should have included code.
....
> echo '<hr />'.$pager->linktags;
It's linkTags, not linktags. Class properties are case sensitive in PHP
as all variables (while functions and methods are not).
Helmut
|
|
|
Re: PHP Pear Pager and $pager->linkTags [message #170755 is a reply to message #170741] |
Fri, 19 November 2010 20:54 |
Chris Percol
Messages: 5 Registered: November 2010
Karma: 0
|
Junior Member |
|
|
On Nov 17, 9:53 pm, Helmut Chang <use...@helmutchang.at> wrote:
> Am 17.11.2010 22:03, schrieb Chris Percol:
>
>>> I am using pear package pager 2.4.8 on PHP 5.2.14 and can't get
>
> >> $pager-> linkTags to work yet $pager->links works no problem?
> ...
>
>> Apologies, should have included code.
> ...
>> echo '<hr />'.$pager->linktags;
>
> It's linkTags, not linktags. Class properties are case sensitive in PHP
> as all variables (while functions and methods are not).
>
> Helmut
Thanks,
Case sensitive is not the issue (tried both), anyone any other
thoughts?
Thanks,
Chris
|
|
|
|