Skip to main content
1 of 3

cant run code on cms page within <a> tag

I wanted to link from a cms block within a product page to its corresponding amazon product which can be identified via an custom attribute called "asin".

So I have put the link like <a href="https://www.amazon.de/gp/product/{{block type="core/template" template="amz/asinlinkinject.phtml"}}">... and the idea was, that this injects the asin, stored in the repsective product...

But whats happening; it replaces the {{...}} with somwething like "...ms_wysiwyg/directive/___directive/e3tibG9jayB0eXBlPSJjb..." after I exit html mode and go back in wisiwig....

So I guess I am doing something totaly wrong here. How could i get the asin in the link?

{{block type="core/template" template="amz/asinlinkinject.phtml"}} which is doing

getasin(); ?>

and it works fine as text outside the tag