Unescape confiforms asUserLink

Hello,

I am using Vertunas ConfiForms plugin and I want to render a user as a link. I am using ConfiForms VirtualFunctions (Virtual Functions) - asUserLink

The page is rendered with escaped html code of the link like this:

image2017-2-3 9:47:9.png

If it was unescaped it would be exactly what I want:

image2017-2-3 9:49:22.png

This is how the page's source looks like

<p class="auto-cursor-target">
  <br/>
</p>
<ac:structured-macro ac:macro-id="2c1d62fa-392d-4e82-a92a-58a6bf7a47a7" ac:name="confiform-list" ac:schema-version="1">
  <ac:parameter ac:name="filter">id:9a09ab10-47f0-409f-8a16-536b1d0e3776</ac:parameter>
  <ac:parameter ac:name="pageTitle">
    <ac:link>
      <ri:page ri:content-title="testPage"/>
    </ac:link>
  </ac:parameter>
  <ac:parameter ac:name="formName">bboard</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="88976837-9c87-4752-b514-565c11ef8af8" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">person.asUserLink</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
  <br/>
</p>

 

I have tried inserting the macro into an HTML macro:

<ac:structured-macro ac:macro-id="56c62df5-589e-42ee-8eda-92a43702624f" ac:name="html" ac:schema-version="1">
      <ac:structured-macro ac:macro-id="88976837-9c87-4752-b514-565c11ef8af8" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">person.asUserLink</ac:parameter>
      </ac:structured-macro>
</ac:structured-macro>

 

but it didn't work.

 

I was thinking about generating user id:

<ac:structured-macro ac:macro-id="88976837-9c87-4752-b514-565c11ef8af8" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">person.id</ac:parameter>
      </ac:structured-macro>

and transforming it into a link with another macro, but I don't know how to get just the value do that,

 

Thank you very much!

1 answer

1 accepted

Hi Miroslav

 

When used inside the ListView, the appropriate function would be "asUserLinkMacro"

 

<p class="auto-cursor-target">
  <br/>
</p>
<ac:structured-macro ac:macro-id="2c1d62fa-392d-4e82-a92a-58a6bf7a47a7" ac:name="confiform-list" ac:schema-version="1">
  <ac:parameter ac:name="filter">id:9a09ab10-47f0-409f-8a16-536b1d0e3776</ac:parameter>
  <ac:parameter ac:name="pageTitle">
    <ac:link>
      <ri:page ri:content-title="testPage"/>
    </ac:link>
  </ac:parameter>
  <ac:parameter ac:name="formName">bboard</ac:parameter>
  <ac:rich-text-body>
    <p>
      [entry.person.asUserLinkMacro]
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
  <br/>
</p>

Thank you, it works as i've expected

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

41 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you