Search via menu item - only one tag can be selecte

  • Martin7
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 3 months ago - 9 years 3 months ago #2281 by Martin7
hello SolidSystem,

I would like to request an extension to your component.

As learned from you CP does not search in subcategries ( see thread 1446-bug-search-does-not-include-subcategories.html ). As a consequence when using CP the administrator should keep relatively flat hierarchy of categories. This would be not a big problem - a logical hierarchy of articles could be realised using smart assignment of various properties to articles (let say CP properties).

But in such case the administrator would need to build various menu item with a bit more smarter selection criterias. But currently what I see in your demo the menu item can fire search using only one single tag selection. This is a quite limitation in compare to the search module you provide.

I would be really a good feature if the CP menu item would have exactly the same power as the search module - this mean the administrator could configure a complex search condition using all properties - and not only one single value of single property.

Kindly asking to extend the CP menu item functionality.

Thanks in advance and best regards

Martin
Last edit: 9 years 3 months ago by Martin7.

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

More
9 years 3 months ago #2282 by andrea_4g
I'm sorry, but the feature you are requesting can't be implemented.
Menu items parameters are hardcoded and must be defined beforehand, hence they can't be arbitrarily increased in number on the fly. (See Joomla doc for more details)

However, there is a workaround - a sort of hack actually - that can do the job.

Disclaimer: while the following "creative" procedure meets your requirement for a multi-criteria search using a single menu item, there's no guarantee that this will work in every case.

The following example is based on www.solidsystem.it/demo31/

1) search, using the Cp Search module, using the number of criteria that you need;
Eg. Price = Low Price, Difficulty = Easy

2) copy the URL, and keep only the querystring part;
eg: option=com_customproperties&view=search&cp[spiciness][]=&cp[price][]=low&cp[with_fish][]=&cp[difficulty][]=easy&cp[sparkling_wine][]=&cp[alcohol][]=&cp[varietal][]=&cp[text_search]=&submit_search=

3) add a "Custom Properties Layout" menu item

4) select a tag - it doesn't matter wich one - and save

5) You need some tool to make the 'Link' form field editable; I'm using the Webdeveloper Toolbar for FireFox (Webdeveloper > Forms > Make Form Fields Writable)

6) Once that the field is editable, paste the url you copied in step 3; see screenshot


7) Save

Here's the screenshot with the result list:

Attachments:
The following user(s) said Thank You: Martin7

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

Time to create page: 0.164 seconds