Page 1 of 1

Specify url as a constant in Oxygen XML web author

Posted: Tue Jul 17, 2018 3:11 pm
by sriram_l
Hi,
In my XML i've a element that holds image element. in order to display the image, I'm specifying the absolute 'url' in the src attribute as follows:
Current implementation:
<figure>
<img src="http://servename:port/context-root/REST_WS/imageID"/>
</figure>

In the CSS I use the following
img{
content:attr(src url);
}

The image is getting displayed correctly but I don't want to embed the complete URL in the 'src' attribute of 'img' element.

Expected:
Is there a way the url can be set as constant and Oxygen XML web Author will append the imageID to this URL.
<figure>
<img src="imageID"/>
</figure>

Thanks!

Re: Specify url as a constant in Oxygen XML web author

Posted: Tue Jul 17, 2018 4:42 pm
by cristi_talau
Hello,

You can use the oxy_concat CSS function to compose the full URL just for display purposes. More details here: https://www.oxygenxml.com/doc/versions/ ... ction.html .

Best,
Cristian