Keyword

Re: K2 category Itemid use first found in menu

  • Marek Tesař
  • Marek Tesař's Avatar Topic Author
  • Offline
  • New Member
More
12 years 4 months ago #66176 by Marek Tesař
i temporarly solved it with tweek of /com_K2/helpers/route.php function getItemRoute on line 26:
function getItemRoute($id, $catid = 0) {
                                     
                $needles = array (
                        'item'=>(int)$id,
                        'category'=>(int)$catid,
                );
                $link = 'index.php?option=com_k2&view=item&id='.$id;
                if ($item = K2HelperRoute::_findItem($needles)) {
                        
                        $link .= '&Itemid='.$_GET['Itemid'];
                }

                return $link;
        }

to this:
function getItemRoute($id, $catid = 0) {
                                     
                $needles = array (
                        'item'=>(int)$id,
                        'category'=>(int)$catid,
                );
                $link = 'index.php?option=com_k2&view=item&id='.$id;
                if ($item = K2HelperRoute::_findItem($needles)) {
                        //$link .= '&Itemid='.$item->id;
                        $link .= '&Itemid='.$_GET['Itemid'];
                }
//     echo     $link;
//        die;
                return $link;
        }


i dont like the GET variable usage, can you please give me a help with this?

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum