0

I wanted to get in product page a sizing chart. I could do that very easy but I want to improve and need some help. So, I created a drop down attribute called size_chart with the following values which identify my static blocks:

  • addidas_shoes
  • puma_shoes
  • nike_shoes

Choosing an option from the list I can get the right static block. Now I would like to change the drop down values to block titles instead of block id's for a better visual improvement, like this:

  • Adidas Shoes
  • Puma Shoes
  • Nike Shoes

How can I get inside my phtml template the block content based on its title instead of its identifier? Is this possible?

0

I think that you don't need to identify your static block by its title. What i understood is that you want to improve the "dropdown experience" for your users, displaying block title instead of block id. In your phtml file you can do something like that:

<select>
  <option value="addidas_shoes">Adidas Shoes</option>
  <option value="puma_shoes">Puma Shoes</option>
  <option value="nike_shoes">Nike Shoes</option>
</select>
1
  • This change is available for Backend not Frontend. I need to achieve having in a drop down list block title instead of block id. If this is not possible I will let it as it is. – ADDISON74 Feb 15 '16 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.