cancel
Showing results for 
Search instead for 
Did you mean: 

Help: need to change behaviour of rnd:displayname(contentLink)

Former Member
0 Kudos

Hello,

I have something like rnd:iconrnd:displayname(contentlink)rnd:action, rnd:description in property columns for a given collection renderer.

For external URL links defined in KM I want to replace the host name with an alias and then let flexui replace the alias with the actual host name defined in systems landscape before rendering the final URL link.

i.e. something like this:

external url in KM = http://%google%/index.html

system definition: alias=google, host name=www.google.com, protocol=http

rendered URL Link: http://www.google.com/index.html

I need to change the behaviour of the inner contentLink globally. This modifier currently creates a URL link to the target resource around the name.

I need to change the way contentLink creates/parses the URL link if the resource is an external URL but leave all the other behaviours the same (i.e. local links, links to KM contents etc).

Where is the right place to make this change? I have seen that the name is rendered by PropertyRendererDisplayName but I can't figure out how/where the URL link is elaborated and attached to the text.

Thanks in advance

Vitaliano Trecca

Whirlpool Corporation

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Would a simple property filter do the job if I modify the property "external link" for resources of type LinkType.EXTERNAL?

Then I only need to specify on which KM path the filter applies....

Am I right?

detlev_beutner
Active Contributor
0 Kudos

Hi Vitaliano,

this at least sounds reasonable; I'm not 100% sure if the property filter gets called when the technical link via "contentlink" is rendered, but - just give it a try (it's not that much work).

Hope it helps

Detlev

Former Member
0 Kudos

Thank you. I will give it a test and will post my findings. Anybody else can suggest other options to change contentlink default behaviour?

Former Member
0 Kudos

Detlev, as you anticipated.... contentlink modifier does not call a filter and does not seem to be related to a property at all. Instead it seems to retrieve the target URL directly from the IResource.

By no means the propetry named "contentlink" is involved.

This sounds to me a bit weird as it is in contrast with usage of properties.

I have also noticed that if I modify the target URL for a link (from the personalize links menu), it gets modified in the IResource and is reflected in the externallink property while the other way round is not true: if I modify the externallink property the target URL of the IResource is unaffected and therefore the url link rendered around displayname is wrong.

I feel a "bit" confused now.

Anybody can give me further directions?

Thanks in advance

Former Member
0 Kudos

I have solved with a workaround until I find a better solution.

I have created my own resource renderer and replaced the one used in LinkListExplorer layout with mine.

My resource renderer uses flexui readymades but intercepts any Link component build during metaPropertyRender() and fixes the URL before rendering if the URL link is for a resource of type LinkType.EXTERNAL and the hostname is the alias of a system landscape instead of a plain host name.

The limit is that this works only within iViews that use such renderer.... in all other cases the link is not parsed and obviously not working.

Kind regards,

Vitaliano Trecca

detlev_beutner
Active Contributor
0 Kudos

Hi Vitaliano,

you could also implement your own PropertyRenderer and replace the rnd:displayname with the additional contentlink directive by your own (dummy) property "displayNameWithContentLink", which could be "composed of" displayname. Then implement the logic into the property renderer and now you can use this property whereever you want.

Hope it helps

Detlev