cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Repository Variable

derekvincent
Participant
0 Kudos

Hello all,

I am trying to migrate an multi-language intranet site to KM with limited success so far...

The largest issue I am running around is languages and views of documents and document types in relations to specific languages...

What I really need is KM variable that defines the logon language of the portal user... much like the user.id... This way I can drop it into directory paths and solve a whole bunch of issues...

I found Thilo message (see link below) regarding building your own and I was wondering if anyone had done this?? Or if SAP is going to release this functionality soon?? Or another way around this...

Cheers,

Derek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

OK then... is there anyone who knows what to do here?

Thanks,

Mike

Former Member
0 Kudos

LOL... nevermind I found it...

IURLGeneratorService ug = (IURLGeneratorService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);

ug.registerPlaceholderResolver(this);

I put this in my implementation of my global service which implements IPlaceHolderResolver et voila... a custom place holder resolver...

Cheers,

Mike

Answers (2)

Answers (2)

derekvincent
Participant
0 Kudos

Thilo, in investigating writting the what you had suggested I decompiled the bc.rf.global.service.urlgenerator_core.jar and was looking at the URLGEnerator.class file and notcied that under the user. is id, name and perflang which does a ctxt.getUser().getPreferredLanguage(). I tried using this in the same fashion that the user.id is used but I am not sure what it is returning and the error when it can not fin dthe directory is to put the path as given and not resolved in.

Any Ideas if this will work??

Cheers,

D.

0 Kudos

Hi Derek,

what you can still do with the API is using the so called placeholder resolver from the KM API: https://media.sdn.sap.com/html/submitted_docs/nw_kmc/javadoc/com/sapportals/wcm/service/urlgenerator...

Just implement your own resolver and register it on the URLGenerator. Than you can parse the RIDs for any custom property.

Best regards,

Thilo

Former Member
0 Kudos

Hello Thilo,

I was wondering if you could provide with some insight into the technique you decribed earlier. I understand the part about implementing my own resolver, but I don't quite understand how to register it on the URLGenerator. Any insight would be much appreciated.

Cheers,

Mike