Jump to content

Show total videos in search bar and more

Recommended Posts

Hello! I would like to show the total number of videos on my website in the placeholder of the search bar, something like: search in 100 videos. In addition to showing the total number of videos on each category page, the total number of videos it has, could you help me?


Link to comment
Share on other sites

In Website UI -> Page components -> include_header_general.tpl the search textfield is rendered like this:

<div class="search-text"><input type="text" name="q" placeholder="{{$lang.search_box.search_hint}}" value="{{$storage.list_videos_videos_list_search_result.search_keyword}}"/></div>

And in Website UI -> Texts you can find this text by searching for search_box.search_hint:

search_box.search_hint = Search

You need to change text to this:

search_box.search_hint = Search in %1% videos

and change template line to this:

{{query_kvs select="count" table="videos" assign="total_videos"}}
<div class="search-text"><input type="text" name="q" placeholder="{{$lang.search_box.search_hint|replace:"%1%":$total_videos}}" value="{{$storage.list_videos_videos_list_search_result.search_keyword}}"/></div>


  • Like 1
Link to comment
Share on other sites

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.

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...