• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Cataloger Recent added werkt niet zoals ik graag zou willen
PostPosted: Wed Mar 10, 2010 1:58 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Nov 13, 2008 12:15 pm
Posts: 412
Op mijn site gebruik ik Cataloger tot volle tevredenheid, alleen blijf ik met 1 vraag zitten de laatste tijd.

Ik heb een pagina aangemaakt waarin met:
Code:
{cms_module module='Cataloger' action='recent' sub_template='Recent' count='5' alias='/'}

de laatste vijf items worden getoond.

Alleen zijn dit niet de laatste vijf toegevoegde items, want ook als je een item aanpast of zelfs verplaatst (hoger of lager in hiërarchie) worden de items op deze pagina getoond.

Nu is mijn vraag of het ook mogelijk is om alleen de laatst toegevoegde en/of laatst aangepast items te tonen.

Onderstaand de php-code van action.recent.php :

Code:
<?php
      if (!isset($gCms)) exit;
      foreach ($params as $key=>$val)
         {
         $this->smarty->assign($key, $params[$key]);
         }
      if (! isset($params['recurse']))
         {
         $params['recurse'] = 'items_all';
          }
      
      list($curPage,$categoryItems) = $this->getCatalogItemsList($params);
        usort($categoryItems,array("Cataloger", "chrono"));
           
        $count = count($categoryItems);
        $start = 0;
        $end = min($count,$params['count']);
        $thisUrl = $_SERVER['REQUEST_URI'];
        $thisUrl = preg_replace('/(\?)*(\&)*start=\d+/','',$thisUrl);
        $categoryItems = array_splice($categoryItems, $start, $end);
        $this->smarty->assign('items',$categoryItems);
      
      $this->smartyBasics();
      echo $this->ProcessTemplateFromDatabase($this->getTemplateFromAlias($params['sub_template']));
?>

_________________
My websites build with CMSMS:
http://www.marcverhaegenfansite.com
http://www.pknscharnegoutum.nl
http://www.itkikkertfiskje.nl
http://www.wpbremer.nl


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner