Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Userfriendly url for item

Userfriendly url for item

Lars Larsen
Lars Larsen
Reply

Hi

I have some items in a named itemlist. I publish these items with the ItemPublisher app on DW 9.1.4. When rendering the list I use this code:

foreach (var item in GetLoop("ItemPublisher:Items.List"))
{
     <a href="@item.GetValue("ItemPublisher:Item.DetailsUrl")">Details</a>
}

I have enabled "Customized Urls" on the itemtype and enabled userfriendly urls for items in "MC-Web and HTTP-Customized URLs". But still the link in the foreach loop in my template renders like: http://[mydomain]/[pagename]?itemId=[itemtypename]:[itemid]

How do I get userfrindly urls when linking to my items (detailpage view)?

 


Replies

 
Nicolai Pedersen
Reply

Hi Lars

The URL provider for items currently only support items that are either pages or paragraphs...

How could this work for named item list? For page and parargaph based items we have a field to take the name from, but for these items, no URL/name field is defined...

 
Lars Larsen
Lars Larsen
Reply

Hi Nicolai

For named itemlists couldn't the url/name field be the field "Use field for title" field on the itemtype definition?

 
Nicolai Pedersen
Reply

Indeed it could!

 
Lars Larsen
Lars Larsen
Reply

Hi Nicolai

Then I have a wish for christmas: make this a feature request :-)

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Of course, created as TFS#29084.

Have a nice x-mas!

Votes for this answer: 1
 
Lars Larsen
Lars Larsen
Reply

Hi Nicolai

Thanks a lot. 

You too have a nice christmas and a happy new year

 

You must be logged in to post in the forum