Yikmings Posted August 8, 2023 Posted August 8, 2023 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 1 Quote
Tech Support Posted August 9, 2023 Posted August 9, 2023 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. 1 Quote
Yikmings Posted August 9, 2023 Author Posted August 9, 2023 Thanks. List sorting already build-ed in 2 random methods. 😀 Quote
Adrian Posted Sunday at 06:26 PM Posted Sunday at 06:26 PM Is there a way instead of having to create a block to just put the videos showing in top rated or most viewed ? Quote
Tech Support Posted Monday at 09:36 AM Posted Monday at 09:36 AM In order to display some videos you need to create a block that will pull them from DB. Quote
Adrian Posted Monday at 06:27 PM Posted Monday at 06:27 PM I have no idea how to create a block that will pull them from DB.Can i get the code to paste in the block for that ? Quote
Tech Support Posted Tuesday at 05:38 AM Posted Tuesday at 05:38 AM Our first reply in this post provides what the code. Quote
Adrian Posted Tuesday at 04:05 PM Posted Tuesday at 04:05 PM 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 Quote
Tech Support Posted yesterday at 01:24 AM Posted yesterday at 01:24 AM This thread's reply #2 provides the exact thing that need to be done. Quote
Adrian Posted yesterday at 01:43 AM Posted yesterday at 01:43 AM How can i: configure its template and parameters to display the list of videos that you need for empty search results. I does not say how to configure that! Quote
Tech Support Posted yesterday at 01:56 AM Posted yesterday at 01:56 AM We updated our first reply to include this info. 1 Quote
Tanjiro Posted yesterday at 06:08 AM Posted yesterday at 06:08 AM I never thought that I need this, but it really useful, thanks for creating this topic question and Tech Support's help 1 Quote
Recommended Posts
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.