Developer forum

Forum » Integration » Generate MetaURL for product

Generate MetaURL for product

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a project where I have defined a Feed using a combination between the standard PIm functionality and a Custom template.

In this feed, I need to add a new node that would contain the MetaURl for the product.
For example, for this URL: https://www.elbielectric.ro/produse/aparataj/aparataj-doza-rotunda/intrerupator-st-alb I have to add <shorturl>intrerupator-st-alb</shorturl>

Is there a method that I can use to generate this value the same way DW is generating it for FriendlyURL?

Thank you,

Adrian


Replies

 
Nicolai Pedersen
Reply

I think not... Maybe you can just use lastIndexOf("/") on the entire URL

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

That would be my last resort :)

Since you don't see any other way, that's probably my solution.

Thank you,
Adrian

 

You must be logged in to post in the forum