How can I change the wording in the "Recent activity" heading?
RespondidaI would like to reword the heading. I see that it is represented by the {{recent_activity}} placeholder. How do I change this text, and other text that is brought by these placeholders?
-
Hi David
You can use some jquery to change it on runtime. That said, please do look at documentation to see if there is a better method.
If you are interested in jquery method, please leave a comment and I would post some code snippet.
Thank youTeam Diziana
Visit Diziana to download free and premium custom responsive ready-to-use Zendesk theme or Zendesk template or Zendesk plugins for Zendesk Help Center. Brand your Zendesk Help Center, and provide fantastic self-service customer support experience. -
Hello David,
Please use this one -
Paste the code on your JS tab
$(document).ready(function() {
$('.recent-activity-header').html('ADD-YOUR-TITLE');
});If face any issue feel free to message us at info@customersupporttheme.com
Thanks
Support Team
http://customersupporttheme.com
(Experts in Zendesk Themes, Zendesk Help Center, Plugins, Help Center Branding and Customization.)
-
Hi Diziana, it would be great if you could post a code snippet, something I could just copy and paste in.
Thanks!
-
Hello Customer Support Theme,
I'm afraid the code you provided is not working for me. I placed it at the end of the code in the JS tab, as you suggested.
Also, I see that the screenshot doesn't contain all the code you provided in the post.
-
Hello David! Could you please provide us link to your Help Center or Screenshot of code that you've changed?
-
This is from after I clicked "Preview"
-
Thanks for the screen. From this point the code looks fine. Please try with this code, paste it on the very bottom of your Home Page code editor (or footer).
<script>
$(document).ready(function() {
$('.recent-activity-header').text('Here is new title');
});
</script> -
works great, thanks! and it's also a better solution for me because I have 2 languages, and this enables me to use Dynamic Content
-
Glad that it works, and even better for Dynamic content!
Feel free to ping us if there is any issue more.
-
Hello @David,
I am totally surprised.How it is possible because at my end its working fine.
Both code snippet is working proper on my side -
$(document).ready(function() {
$('.recent-activity-header').html('Your New Title');
});$(document).ready(function() {
$('.recent-activity-header').text('Your New Title');
});You can also see the Live Demo.
Thanks
Support Team
http://customersupporttheme.com
(Experts in Zendesk Themes, Zendesk Help Center, Plugins, Help Center Branding and Customization.)
-
@Vladan,
Any idea why this isn't working for me? I have also tried @Customer Support Theme's code.
I'm racking my brains here so your advice would be great!
Thanks,
Jess
-
Hi Jess, just remove this my code from JS tab, and put it (copy/paste) on the very bottom of Home Page code. Please let me know if there is an issue after this change.
Thanks!
-
Thank you Vladan that worked perfectly.
-
This code works great to change "Recent activity" to "Recently viewed":
<script>
$(document).ready(function() {
$('.recent-activity-header').text('Recently viewed');
});
</script>But I can't get the dynamic content function to work. I've defined the content on the Dynamic Content page:
What then is the syntax for using the placeholder in the script? I tried many different syntaxes, including these:
<script>
$(document).ready(function() {
$('.recent-activity-header').text({{dc 'recently_viewed'}});
});
</script><script>
$(document).ready(function() {
$('.recent-activity-header').text="{{dc 'recently_viewed'}}";
});
</script><script>
$(document).ready(function() {
$('.recent-activity-header').text={{dc 'recently_viewed'}};
});
</script>But my home page still shows the default text "Recent activity". What am I missing?
-
Hi @Tami,
Try putting your code at the bottom of home_page.hbs template.
<script>
$(document).ready(function() {
$('.recent-activity-header').text("{{dc 'recently_viewed'}}");
});
</script>Let me know if you face any issue.
Team Diziana
-
Hi Team Diziana,
The code is at the bottom of my home page:
It does work to change "Recent activity" to "Recently viewed", but I can't get it to work as Dynamic Content. -
@Tami,
All you need to do is remove that '=' in your code at line no. 75 and you will be good to go.
Let me know if you face any issue.
Team Diziana
-
Ok, that one worked:
$('.recent-activity-header').text("{{dc 'recently_viewed'}}");
I thought I'd tried that syntax, but must not have --thanks much, Trapta!
-
Where can i find $('.recent-activity-header'). in the documentation. I want to write other stuff but can't find the objects.
-
Here's the JavaScript solution for themes that don't use jQuery. Just change the "Recent Updates" text to what you want, place it in your theme's script.js file:
document.getElementsByClassName("recent-activity-header")[0].innerHTML="Recent Updates";
-
Thanks for sharing that, Brett!
-
Is there a way I can limit it to recently added articles? Please suggest.
-
Hey Shweta,
We don't have a placeholder for recently added articles, however, if you create an article you can promote it and then use the promoted_articles placeholder instead. Check out our available Helpers here: Help Center Helpers
I hope this helps!
-
Can't seem to get this down. Any suggestions?
-
Hi Jimmy -
In order to add Javascript, you'll want to add your code to the script.js file, rather that putting in the HTML page templates. See Customizing your help center theme
-
@... - Was following some of the comments above that suggested adding it to home_page.hbs. I just want to change the "Recent Activity" to "Recently Viewed" on my homepage. Any suggestions?
-
Hi Jimmy! As Brett noted above in the comments, you can just put this in your script.js file:
document.getElementsByClassName("recent-activity-header")[0].innerHTML="Recent Updates";
-
It is possible to display "category" instead of "section" in "Recent Activity" section?
-
Hi team, How can I change the wording in the “Fallow” button?
-
Hi Fiorella!
You can try adding something like this at the bottom of the script.js file.
This code specifically allows you to change the "Follow"/"Unfollow" button text within article pages.
$(document).ready(function() {
if($(".article-subscribe div button").attr("data-selected") === "false") {
$(".article-subscribe div button").text('Something')
} else {
$(".article-subscribe div button").text('Something Else')
}
});
$(".article-subscribe").click(function() {
if($(".article-subscribe div button").attr("data-selected") === "false") {
$(".article-subscribe div button").text('Something')
} else {
$(".article-subscribe div button").text('Something Else')
}
});
Por favor, entrar para comentar.
30 Comentários