Im having some trouble with having an external link with the Embedded Content package from The Farm.
I set up the package so that the user would be able to add various business addresses on a partners page.
This works great, but i would like the web address to be a link to the external site of that partner.
I managed to get the email working from brwosing the forum & I have tried some work arounds such as inserting the select value of the "web" into a href tag, but with some parsing errors.
You should be able to do it the same way you did your email link:
<a target="_blank"> <xsl:attribute name="href"><xsl:value-of select="web"/></xsl:attribute> <xsl:value-of select="web"/> <!-- the text to show for the link --> </a>
Or a shorter way:
<a href="{web}" target="_blank"> <xsl:value-of select="web"/> <!-- the text to show for the link --> </a>
Embedded Content Packages + URL link
Hi there,
Im still new to Umbarco & XSLT.
Im having some trouble with having an external link with the Embedded Content package from The Farm.
I set up the package so that the user would be able to add various business addresses on a partners page.
This works great, but i would like the web address to be a link to the external site of that partner.
I managed to get the email working from brwosing the forum & I have tried some work arounds such as inserting the select value of the "web" into a href tag, but with some parsing errors.
Any help would be great.
Thanks
Martin
The XSLT that I have is as follows.
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!-- start writing XSLT -->
<xsl:for-each select="$currentPage/partners/data/item">
<div class="tal-8">
<ul class="partnerAdd">
<li class="location"><xsl:value-of select="location"/></li>
<li><xsl:value-of select="address1"/></li>
<li><xsl:value-of select="address2"/></li>
<li><xsl:value-of select="city"/></li>
<li><xsl:value-of select="state"/></li>
<li><xsl:value-of select="country"/></li>
<li><xsl:value-of select="areaCode"/></li>
<li>T: <xsl:value-of select="telNo"/></li>
<li>F: <xsl:value-of select="faxNo"/></li>
<li>E:
<a>
<xsl:attribute name="href">mailto:<xsl:value-of select="email"/></xsl:attribute>
<xsl:value-of select="email"/>
</a>
</li>
<li>W:
<xsl:value-of select="web"/>
</li>
</ul>
</div>
</xsl:for-each>
</xsl:template>
Hi,
You should be able to do it the same way you did your email link:
Or a shorter way:
Hope this helps,
Tom
Thanks Tom,
I was trying the same solution as I had for the email and have also tried the solution you gave me.
The probelm I had for both was that the URL seems to look locally.
If I added a link as www.partner.com, I would get a URL of www.mysite.com/www.google.com
The email works fine, but any help again would be great.
Hi Martin,
Just put http:// before your web url and it will work.
Ben
Thanks Guys,
is working on a reply...