Specify url as a constant in Oxygen XML web author

Oxygen general issues.
sriram_l
Posts: 10
Joined: Wed Jun 06, 2018 4:59 pm

Specify url as a constant in Oxygen XML web author

Post 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!
cristi_talau
Posts: 496
Joined: Thu Sep 04, 2014 4:22 pm

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

Post 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
Post Reply