Jump to content

Recommended Posts

Posted

Hi,

I found my client's website getting a lot of "soft 404" on some empty search result pages. Is that any way to add "random/you may like" video list on empty search result? Make it seo friendly.

Thanks

Edward

  • Like 1
Posted

Yes, this is possible. You need to go to Website UI -> Pages -> Search Content page and edit its template. Where you have this line:

{{$videos_list_result|smarty:nodefaults}}

You can wrap it with the following construct:

{{if $storage.list_videos_videos_list_search_result.total_count>0}}
	{{$videos_list_result|smarty:nodefaults}}
{{else}}
	{{insert name="getBlock" block_id="list_videos" block_name="Recommended Videos"}}
{{/if}}

Then it will create an additional Recommended Videos block on this page and you can configure its template and parameters to display the list of videos that you need for empty search results.

For new block template you can use something like this:

{{assign var="list_videos_title" value="Nothing found, you may also like these"}}
{{include file="include_list_videos_block_common.tpl"}}

For parameters you basically need to modify items_per_page and sort_by.

  • Like 1
  • 1 year later...
Posted

What i need to do in that block so when an search query is empty to show random videos or most popular on aything, i keep try to find how but i only found a way so when an search query is empty they are redirected to hompage but that is not what i want

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...