This has been resolved by leofonic: module for alist and search:
<?php class redirectalist extends redirectalist_parent{ public function render() { parent::render(); if ($this->_iAllArtCnt==1){ foreach ($this->getArticleList() as $oArticle){ $sLoc = str_replace('&','&',$oArticle->getLink()); header("Location: ".$sLoc, true, 301); exit(); } } return $this->getTemplateName(); } } ?> -----Ursprungliche Nachricht----- Von: dev-general-boun...@lists.oxidforge.org [mailto:dev-general-boun...@lists.oxidforge.org]im Auftrag von Achim Leinberger Gesendet: Mittwoch, 14. April 2010 19:00 An: dev-general@lists.oxidforge.org Betreff: [oxid-dev-general] Classes alist / search: Redirect to product whenonly 1 in list Hi, when the search or a category listing merely produces 1 result, it would be good to render the resulting product and not list it. The classes alist and search both have an object "$this->_iAllArtCnt" which could be used to determine that in fact there is only 1 product. The product data are in the $this->getArticleList() object. I am looking for help on 2 aspects: 1. How do I query the getArticleList-object in order to 2. redirect the page rendering to the details class. Any help is greatly appreciated! Achim _______________________________________________ dev-general mailing list dev-general@lists.oxidforge.org http://dir.gmane.org/gmane.comp.php.oxid.general _______________________________________________ dev-general mailing list dev-general@lists.oxidforge.org http://dir.gmane.org/gmane.comp.php.oxid.general