Hello,
For my new website that I’m building with EE, I use a hidden template for the “buttons” that I have in the right hand column of my website. Generally it is just a “Hire Us” button but I’ve made it to use embed variables so it can pretty much display anything I want in the appropriate button format.
It’s been working perfectly thus far, until I tried to embed the template more than once into another template (a.k.a. I want two buttons on one page). Instead of giving me two unique ones according to the parameters I supply in the embed tag, it just gives me two identical buttons.
Here is the code in the “button” template to be embedded:
{if embed:link_title == ""}
<a href="http://{embed:path}" rel="noopener {embed:rel}" title="{embed:title}" class="nounder" target="{embed:target}">_{if:elseif embed:link_title != ""}_<a href="{embed:path}" rel="{embed:rel}" class="nounder" title="{embed:link_title}"target="{embed:target}">_{/if}_<span class="right_button_wrap">_<span class="right_button">_ <span class="rb_left">_ {embed:icon}_ </span><span class="rb_right">_ <span class="rb_t1">{embed:title}</span>_ <span class="rb_t2">{embed:text}</span>_ </span>_ <span class="rb_clear"></span>_</span></span></a>
And here is the code that I’m trying to use to embed the template into my pages:
{embed="site/.right_button" path="{exp:removepar}{preview}{/exp:removepar}" icon="/images/site/icon_globe.png" title="View It" text="Click to see." target="blank"}
{embed="site/.right_button" path="{hire_path}" icon="{hire_icon}" title="{hire_title}" text="{hire_text}"}Would anyone be able to point out the problem in my code or a work-a-round to the issue that I’m having. If you’d like a preview you can check out my dev site…
One Button: http://ee.quickscriptz.ca/about/
Two Buttons: http://ee.quickscriptz.ca/portfolio/sky-blue-radio/
Any help would be greatly appreciated - thanks in advance!
P.S. I think that made sense? Just let me know if I need to clarify…