Jump to content
thirty bees forum

How to change the text value of the blockcategories module?


Recommended Posts

Posted

I tried, searching in 'Localization > Translations', but I can't find a matching field for the module.

I assume it should have some kind of variable configured, so the title field changes accordingly to the name of the category. But, I would like to overwrite with a fixed value.

I have done it with the block just below: FILTROS (previous: CATEGORY).

853958905464.JPG

Posted (edited)

I have done it with custom JS, and it's working as expected, expected that it also works when there's not a blockcategories element shown, but another one:
 

// Get field's value dynamically
var blockcatTitle = document.querySelector(".block .title_block");
// Change the value of the text field
blockcatTitle.textContent = "Categorias";

853958905464-1.JPG

Edited by MaxStrax
Posted

Fixed:
 

// Get field's value dynamically
var blockcatTitle = document.querySelector("#blockcategories .title_block");
// Change the value of the text field
blockcatTitle.textContent = "Categorias";

But, just for curiosity. Is there another available built-in method in TB to allow that?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...