How to add a DC on the search placeholder??
Hey There,
Can anybody help me out on this I am using the default Copenhagen theme I want to add search placeholder text according to the language.
There is another case
If my HC does not have multiple Language then I can use the native one which is English and I plan to add another language in Future then just have to add a DC then it worked according to that
Thanks in advance
Ronit
-
Hi Ronit,
Follow This article :
https://support.zendesk.com/hc/en-us/community/posts/360038327373-Search-Multilingual-Placeholder
-
Ifra
I have already gone through this article before, unfortunately, I don't wanna do like this is there any other way to achieve this
thanks
-
Okay, so try this type to add DC in searchbar:
Copy this and paste at your document_head.hbs template but first you will need to expose setting in manifest and then map the identifier of that setting in search placeholder like given code.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$( ".search-full #query" ).attr('placeholder',"{{dc settings.search_placeholder}}");
});
</script>search_placeholder this is the identifier of exposed searchbar placeholder setting in manifest
After exposing the search-placeholder setting, keep dc in textbox in setting panel as in screenshot:
When you create DC you can keep English as default language. You should try this, hopefully it will resolve your query.
댓글을 남기려면 로그인하세요.
3 댓글