cancel
Showing results for 
Search instead for 
Did you mean: 

XML form: concatinating data fields in "output views"

Former Member
0 Kudos

Hi,

We are looking for a way to concatinate datafields/strings in the "show" XML forms. In our case we have 2 datafields in the datastructure: "picture" and "size". These 2 datafields will be combined with the servername of a media server to provide the URL for pictures in XML form articles.

As an example:

<picture>image1.jpg</picture>

<size>200</size>

will result in the URL:

http://<mediaserver>/<picture>?format=<size>;

I see 2 ways this can be done:

- concatinating the strings in the input form for the picture that is to be shown

- saving the concatinated urlstring in an own datafield whitch is used as the picture url

Can anyone help out with how we can concatinate datafields and strings like this?

Can this alternatively be done in the xslt files?

best regards,

Bjorn

Accepted Solutions (1)

Accepted Solutions (1)

former_member748019
Participant
0 Kudos

Hi Bjorn,

your described sceanrio (combining data fileds) cannot be reached by XFBuilder standard methods. But naturally its easy to modify your Show.xsl afterwards.

Therefore you have to find the Label in the XSL for displaying your link, and insert some piece of XSL code, for example, something like that:

<a class="urLnkReport urTxtStd">

<xsl:if test="picture!=''" >

<xsl:attribute name="href">

javascript:open_url('http://mydomain/<xsl:value-of select="picture"/>?format=<xsl:value-of select="size"/>')

</xsl:attribute>

</xsl:if>

</a>

You can easily test your hand made XSL styles without restarting your portal, if you are clearing the the caches

(a) ca_pipeline

(b) ca_xmlforms*

from the CacheMonitor

hope that helps

--Matthias

Message was edited by: Matthias Rinck

Answers (0)