× If you report a bug please specify the joomla and component version.

normal [SOLVED] Search17_Custom is using wrong Site Templates

9 years 8 months ago #244 by radekolbas
Dear Bram,

i am just trying to make search17_custom works fine but i have one problem. You can see it on i-shopping.biz/damen.html

in left top corner you will find search. It works just fine but I want to have items showed in template "mcol.php". But if I open one page where template is "thumb.php" I get also search results in same template. Can I change it, so that I always get search results in "mcol" template?

Cheers,
Rade


  • Posts: 33
  • Thank you received: 3

  • Gender: Unknown
  • Birthdate: Unknown
  • Please Log in or Create an account to join the conversation.

    9 years 8 months ago #248 by bram
    The menu configration has two options to assign a layout, for the first page and for the other pages. The search result uses the 'first page' layout.
    Probably makes more sence to change this to 'use other pages' will consider that.

    In the original default_mcol.php you will see how the template changes if a single product is shown, that is when the 't' parameter is set.

    You can do similair in the thumbs using
    JRequest::getVar('q','');
    to check for the query parameter.


  • Posts: 1421
  • Thank you received: 234

  • Gender: Unknown
  • Birthdate: Unknown
  • Please Log in or Create an account to join the conversation.

    9 years 8 months ago #253 by radekolbas
    Replied by radekolbas on topic Re: Search17_Custom is using wrong Site Templates
    great, works just fine. I used this code:

    $q=JRequest::getVar('q','');
    if ( $q ) {
    echo $this->loadTemplate('mcol');
    } else {
    ...


  • Posts: 33
  • Thank you received: 3

  • Gender: Unknown
  • Birthdate: Unknown
  • Please Log in or Create an account to join the conversation.

    Time to create page: 0.107 seconds