Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Mauro Sartori
XSL and Link to Page Problem
December 18, 2012 8:17 AM
Answer

Mauro Sartori

Rank: New Member

Posts: 7

Join Date: September 25, 2012

Recent Posts

Hi,

i have this problem and i haven't found nothing to help me out

This is my XLM, created with the web content structure schema :

<?xml version="1.0"?>

<root>
<dynamic-element name="Title" type="text" index-type="text" repeatable="false"/>
<dynamic-element name="Image" type="image" index-type="" repeatable="false"/>
<dynamic-element name="Testo" type="text_area" index-type="text" repeatable="false"/>
<dynamic-element name="Link" type="selection_break" index-type="" repeatable="true">
<dynamic-element name="Label" type="text" index-type="" repeatable="false"></dynamic-element>
<dynamic-element name="Link" type="link_to_layout" index-type="" repeatable="false"/>
</dynamic-element>
</root>

I want to translate the dynamic link of the BOLD tag in a real URL with this XSL transformation schema :

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" indent="yes"/>
<xsl:template match="/root">
<div class="container_12 ntt-big-banner-container">
<div class="grid_12 ntt-template-row">
<div class="ntt-big-banner-subcontainer">
<img alt="">
<xsl:attribute name="src">
<xsl:value-of select="dynamic-element[@name='Image']/dynamic-content"/>
</xsl:attribute>
</img>
<div class="ntt-big-banner-overlay">
<h3 class="ntt-big-banner-title"><xsl:value-of select="dynamic-element[@name='Title']/dynamic-content"/></h3>
</div>
</div>
<p class="ntt-descriptive-paragraph">
<xsl:value-of select="dynamic-element[@name='Testo']/dynamic-content"/>
</p>
<div class="ntt-plus-bulleted-horiz-list">
<xsl:for-each select="dynamic-element[@name='Link']/dynamic-content">
<a>
<xsl:attribute name="href">
<xsl:value-of select="dynamic-element[@name='Link']/dynamic-content"/>
</xsl:attribute>
<span><xsl:value-of select="dynamic-element[@name='Label']/dynamic-content"/><span></span></span>
</a>
</xsl:for-each>
</div>
</div>
</div>

</xsl:template>
</xsl:stylesheet>

With this XSL the attribute href ot the tag <a> returns the value "2@public" how could i translate this in a real URL for Liferay?

Thanks in advance and excuse me for my poor english

Mauro
Mauro Sartori
RE: XSL and Link to Page Problem
December 21, 2012 3:24 AM
Answer

Mauro Sartori

Rank: New Member

Posts: 7

Join Date: September 25, 2012

Recent Posts

No one know the answer or where i can find some info ?

Thanks in advance

Mauro
Mauro Sartori
RE: XSL and Link to Page Problem
December 31, 2012 7:17 AM
Answer

Mauro Sartori

Rank: New Member

Posts: 7

Join Date: September 25, 2012

Recent Posts

Up no one know the answer or point me to a book or documentation about XSLT trasformation in Liferay ?

Thanks in advance

Mauro
Mauro Sartori
RE: XSL and Link to Page Problem
January 8, 2013 8:54 AM
Answer

Mauro Sartori

Rank: New Member

Posts: 7

Join Date: September 25, 2012

Recent Posts

Hi,

in velocity i found $<object>.getURL(), there is an XSL equivalent ?

Please help me i'm stuck for 2 weeks now with this problem.

Thanks in advance

Mauro
Isaac Guerra
RE: XSL and Link to Page Problem
January 29, 2013 5:55 AM
Answer

Isaac Guerra

Rank: New Member

Posts: 2

Join Date: January 29, 2013

Recent Posts

Hey Mauro!
Finally have u solved the problem?

i'm stuck here in the same problem and i can't figure it out!

thank you

Isaac
Mauro Sartori
RE: XSL and Link to Page Problem
January 31, 2013 1:54 AM
Answer

Mauro Sartori

Rank: New Member

Posts: 7

Join Date: September 25, 2012

Recent Posts

Hi Isaac,

no one know the answer, i think that features is not present in Liferay 6.1.x maybe in the 6.2 i don't know. The information about Liferay in general are very rare so i drop the project and used another CMS with better support and better community.

Regards,

Mauro