Question

1
Replies
325
Views
Ashish Kathait (AshishK6140)
Tata Consultancy Services

Tata Consultancy Services
MX
AshishK6140 Member since 2015 12 posts
Tata Consultancy Services
Posted: February 24, 2020
Last activity: 1 day ago
Posted: 24 Feb 2020 14:13 EST
Last activity: 14 Jun 2021 7:38 EDT
Closed

How to set image name dynamically in HTML

I am using the below code to set the image in HTML and later displaying it in the section:

<html>

<head>

<title>QR Test</title>

<style type="text/css">

   div.boxed { border-style: solid; }

  </style>

  </head>

  <body>

  <div class='boxed'>

    <img src='<pega:contentURL name="TestQRCode.png" path="/qrcode/" classType="Image"/>' >

  </div>

  </body>

  </html>

 

But I have to pass the image name dynamically. So I used the below code :

<html>

<head>

  <title>QR Test</title>

  <style type="text/css">

   div.boxed { border-style: solid; }

  </style>

  </head>

  <body>

  <div class='boxed'>

    <img src='<pega:contentURL name=<%= tools.findPage("pyWorkPage").getProperty(".Property1").getStringValue()%> path="/qrcode/" classType="Image"/>' >

  </div>

  </body>

  </html>

 

But I am getting the below error: 

content of stream definition—

An expected quote character is not found after attribute name.

Could you please help me so that I can pass the image name dynamically

 

Pega Configure Price Quote for Communications 8.2 Enterprise Application Development Dev/Designer Studio Communications and Media Senior System Architect
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.