Avoid the Asset list when search only find a single asset ?

More
6 years 1 month ago #11249 by PierreBeghin
Hi,

The way the hub works is great when you have multiple assets.
However, if you have only one asset, but are going to have more in a few weeks, it would be nice to directly show the rooms when you make a search.
The same can happen if your search criterias narrow the result to a single asset...

So, I'm looking for a way to bypass it.

Thanks,
Pierre

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

More
6 years 1 month ago #11250 by solidres
Hi,

To search for specific asset, you can enable option "Search by name" in your Advanced Search module.

Regards,

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

More
6 years 1 month ago #11251 by PierreBeghin
Hi,

Thanks for your answer.

However, even if I search by name, the advancedsearch module will still bring me to a view with a single asset (see Attachment step 1).

This is pretty useless, as the filters on the left side are unable to narrow the list of a single asset !

Moreover, this pattern requires an unneeded click on the asset link to show the rooms that, I believe, should appear immediately after the search in case of a single asset (see Attachment step 2).

Do you have a workaround or a direction to modify the code to implement this?

Best regards,
Pierre
Attachments:

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

More
6 years 1 month ago #11252 by PierreBeghin
Quick and Dirty solution.

Edit searchresultslistview.php line 52 (just after $deepLink = JRoute::_($deepLink);)

Add 2 lines

if (count($displayData) == 1)
JFactory::getApplication()->redirect($deepLink);

Could be conditionned to a flag in configuration ("Skip the Asset page if single in result view ?")

Pierre

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

More
6 years 1 month ago #11259 by solidres
Hi,

Thank you for your code modification details. It looks like a nice quick solution for this issue.

We are going to move this topic into our Feature Requests forum so that we can track it easier.

Regards,

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

Moderators: solidres
Powered by Kunena Forum

All the things you need to make your work easier. Did you like Solidres?