-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 It's:
$paginator->getTotalItemCount(); ................................... : ___ _ ___ ___ ___ _ ___ : : | \ /_\ / __| _ \ _ (_) \ : : | |) / _ \\__ \ _/ / | |) | : : |___/_/:\_\___/_| |_|_\_|___/ : :........:........................: : Web : http://www.dasprids.de : : E-mail : [email protected] : : Jabber : [email protected] : : ICQ : 105677955 : :........:........................: Deepak Shrestha schrieb: > Hi all, > > When trying to access the totalItemCount property of Paginator, I am > getting this error: > ========================== > Notice: Undefined property: Zend_Paginator::$totalItemCount > ========================== > > Is this bug? > > Problem elaboration > =============== > before using paginator, my following view script logic was working perfectly: > > ******************************** > <? if ($this->myentries): ?> > <? foreach ($this->myentries as $entry): ?> > //show the entries > <? endforeach ?> > <? else: ?> > <h1>Sorry! There are nothig to display for this search</h1> > <? endif ?> > ****************************** > > now I am passing paginator to this view script and the problem is > "ELSE" part is not working anymore even if no entries are fetched. > Result page shows nothing (no message). Instead it hangs my server. > > I tried to use the totalItemCount property to check if paginator > really have some items before passing it to view script > OR > I tried to use the totalItemCount in viewscript itself > > <? if ($this->myentries->totalItemCount !== 0): ?> > > in both cases, i am getting the error notice. > > Any suggestion on this? > > What is the correct way to make this logic work again? > > > Thanks > > > ======================= > Registered Linux User #460714 > Currently Using Fedora 8, 10 > ======================= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmcD64ACgkQ0HfT5Ws789CvsACfTGP/R3L/rAvkqtc7fBaVLZnC uE8AoISVmZUknzbdS7Fs/MuhqzcFbTOt =zoq4 -----END PGP SIGNATURE-----
