SEF, Search and Itemid

Discuss Search Engine Optimization in relation to Joomla!. This forum will also have discussions on SEF/SEO Joomla! extensions.

Moderator: General Support Moderators

zoomler
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sun Dec 07, 2008 8:44 pm

SEF, Search and Itemid

Postby zoomler » Mon Dec 12, 2011 1:47 pm

I have noticed that when Joomla! SEF url is turned on, Itemid is ignored in Joomla search results or similarly on 3rd party extensions such as cloud tags.

I even tried to hardcode Itemid as hidden field in search form, it works fine in non SEF url, but as soon as I turn SEF on, Itemid is ignored.

It would be nice to make it work, to control which modules to be shown in a search. There situations where there are no module shown in all pages, except maybe search form and footer. In this case you end up with a page that contains search results, search form and a footer.

Does anybody know if this one can be fixed?

User avatar
DeanMarshall
Joomla! Hero
Joomla! Hero
Posts: 2352
Joined: Fri Aug 19, 2005 2:26 am
Location: Lancaster, Lancashire, United Kingdom
Contact:

Re: SEF, Search and Itemid

Postby DeanMarshall » Tue Dec 13, 2011 11:20 am

The answer to this is much simpler than hacking the core code.

Simply create a menu item for search, we have this as a viewable - clickable link but it could be in a hidden menu.

Once the menu item is available you can assign any module to that menu item you want from within any module.

Dean
Dean Marshall Consultancy - six Joomla experts - http://www.deanmarshall.co.uk/

Joomla Experts - Joomla Support http://www.deanmarshall.co.uk/joomla-services/joomla-help-joomla-support.html

User avatar
DeanMarshall
Joomla! Hero
Joomla! Hero
Posts: 2352
Joined: Fri Aug 19, 2005 2:26 am
Location: Lancaster, Lancashire, United Kingdom
Contact:

Re: SEF, Search and Itemid

Postby DeanMarshall » Tue Dec 13, 2011 1:57 pm

Search is a component just like content or contact. It displays just like an article with all the modules around it.

If you look in the administrator area under 'Components' you will see 'Search'. If you want to assign specific modules to your search page, you will need to create a menu item for the search component.

As a test go to your main menu and create a new menu item, in the list you will see 'Search' click it and then click the inner link.

Now give the menu item a title 'Search' and save, now position the 'Search' menu item where you want in your menu structure, remember this is a test.

Refresh the front end of your site to display the new menu item 'Search', click it to display the search component, any modules around it can be removed or new ones added by going to - Extensions > Module Manager.

Select a module that currently displays on the search component page. In that modules settings you will see 'Menu Assignment', un-select the module from the newly created search menu item in main menu and click 'Apply'.

Now refresh the front end of the site and you will see that the module no longer displays on the search page.

If you don't want a search link in a visible menu then create a hidden menu, this is simple to do.

Firstly go to the 'Menu Manager' under 'Menus' and click 'New', name this menu 'hidden'.

Go to the new hidden menu and create a menu item 'Search', follow the steps above and you can now target any modules to your search page. Remember to remove the search link in the main menu.

p.s A hidden menu is very useful to have, for things like thank you pages that users get redirected to after submitting forms etc.

Dean
Dean Marshall Consultancy - six Joomla experts - http://www.deanmarshall.co.uk/

Joomla Experts - Joomla Support http://www.deanmarshall.co.uk/joomla-services/joomla-help-joomla-support.html

zoomler
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sun Dec 07, 2008 8:44 pm

Re: SEF, Search and Itemid

Postby zoomler » Wed Dec 14, 2011 2:22 pm

Thank you all for your valuable help. It worked.

Before I post the forum, I also created a hidden menu, I assigned the desired modules for this hidden menu, then I changed the form by inserting a hidden field Itemid=number_id_of_hidden_menu. What I initially did, worked in non-sef urls but when I turned sef on, it didn't work.

Your solution worked fine with sef turned on.

I like hidden menus, there are situations where module 1 for example has to "trigger" module 2 to to run a process and module 2 results to be displayed in component position. Then hidden_menu_Itemid and article_id in module 1 and article with {loadposition module2} makes the magic.

I have now to found a solution for a tags extension (joomlatags.org) where I have a similar problem. I'll try the same technique you told me - joomlatags is a module/component/plugin extension.

Thank you again

onlinewebs
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Mar 20, 2010 10:59 am

Re: SEF, Search and Itemid

Postby onlinewebs » Tue Aug 04, 2015 12:32 am

Hi,
I followed the procedure as highlighted by you, but am unable to get rid of some of the modules that I have on the home page.
These modules are set not to be shown on the search output page but still they appear when I make a search from the home page. Can you please help.
My website is http://justicefinder.com


Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 7 guests