Developer forum

Forum » Feature requests » Friendly Link in Item Type Link

Friendly Link in Item Type Link

Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply

Hello, I have an Item Type that is of type Link and I am developing a SPA app using the DWAPI. We build the routes in the frontend by calling the backend and we use the friendly URLs to navigate. However the data that I receive in the Link item type is just the unfriendly DW link (Default.aspx?Id=10652). I am wondering if you could return the friendly URL as well?

Regards.

Unnsteinn


Replies

 
Martin Vang Dynamicweb Employee
Martin Vang
Reply

Hi Unnsteinn,

Shouldn't be much of a problem to make it respect the url settings. I'll take a look and see if we can add it, then post an update.

BR

Martin

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You can also take a look at the navigation endpoint which can return all pages and urls for a given website.

I.e. for website with id 1: 

/dwapi/frontend/navigations/1?ExpandMode=All

BR Nicolai

 
Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply

We are creating item types and using the data from them to compose components in the front end, and one of those item types has a Link item and I want to be able to use the link path directly in the front end instead of having to use the page ID to call the API again and get the friendly url.

Regards

Unnsteinn

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Yes - I misunderstood, sorry!

Martin has a solution, so we will make that part of an upcoming release!

 
Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply

Great news, thanks for the quick reply guys!

 

Regards

Unnsteinn

 
Martin Vang Dynamicweb Employee
Martin Vang
Reply

I've changed the viewmodels such that we now check the sites settings to see if we use simple or friendly urls for the following:

Link on the page you mentioned

Links on items / item links

There might be more. Let me know if you find anything else or know of something that was missed.

Should be out in a Dynamicweb package pretty soon - once we've confirmed that I don't break more than I fix. :)

BR

Martin

 
Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply

Great, I will test it as soon as it is released and I ping you if there is anything.

 
Martin Vang Dynamicweb Employee
Martin Vang
Reply
This post has been marked as an answer

Hi Unnsteinn,

Sorry about the wait - we're doing a lot of changes in how the items work in the viewmodels, and I had to make sure that those work in the same way. And they do. But those wont be available before next release.

Anyway, your request is available in the package Dynamicweb 9.10.14

Let us know if you find any other things that we can improve.

BR

Martin

Votes for this answer: 1
 
Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply

I cannot find the 9.10.14 version, the latest version I can find to download is the 9.10.5 version.

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

It's not the full download that Martin is referring to but an individual package: https://www.nuget.org/packages/Dynamicweb/

Imar

 
Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply

We are not using Nuget in this project so I will have to wait until it is available as a full download.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You can just download the package and unzip it - just rename the download from .nupkg to .zip. Inside is a dll and you can just copy that to /bin.

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Unnsteinn

The fix is now part of full release 9.10.7

This is available through the download section: https://doc.dynamicweb.com/downloads/releases

Please contact support@dynamicweb.dk if you have any questions regarding the update

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum