Developer forum

Forum » CMS - Standard features » How to get url of items in an Item relation list

How to get url of items in an Item relation list

Thomas Overgaard Nielsen
Reply

Hi

I am playing around with the item field type: Item Relation List, and have a question on the fields exposed to my template within the loop resulting from this field.

Let's say I have an item type with a field of type Item Relation List.
The name of the field is 'Related_Items' - and it is pointing to page type items.

When looping through the items in Related_Items, how do I get the url of an item as it resides in my page tree?

I would expect something like:

@foreach (LoopItem i in GetLoop("Item.Related_Items")){
   @i.GetValue("Item.Related_Items.Url")
}

 .. similar to what we can do in an ItemPublisher template, where field 'Url' points to the item page and field 'DetailsUrl' points to the item details view as defined by the selected details template.

But for item relation lists I apparently only have the field 'DetailsUrl', which points to the current page with an added parameter.
Eg:  /Default.aspx?ID=6&itemId=ItemType:3

.. which to me doesn't make much sense, as we do not have a details view

Am I missing something?
I didn't find any documentation on Item Relation Lists

 

Best regards

Thomas


Replies

 
Mikkel Ricky
Reply
This post has been marked as an answer

You're not missing anything, but the urls to items in the item relation list are missing. That's a bug (or a missing feature). I've created a work item for resolving this (#15922).

Best regards,
Mikkel 

Votes for this answer: 1
 
Thomas Overgaard Nielsen
Reply

Hi Mikkel

Thanks for responding.

Still pretty new around here, so please bear with me if this is common knowledge :)

But what are the procedures for these kind of bug/isues/missing features?
Are there public lists besides the Known Bugs list and the planned bug fixes for the individual releases?
Or is some kind of validation required before an issue makes it to the Known bugs list?

Best regards
Thomas

 
Christian Rud Skovgaard
Reply

Hi Thomas,

All customer registered bugs will appear here: http://developer.dynamicweb.com/releases/known-bugs.aspx unless the bug in question is a security issue.

The list has a 24 hour "lag" since it is exported once per day.

 

Kind regards

Christian

 
Gheorghe Balan
Reply

Hi.

Has the bug been fixed  ?

I am aware of the workaroung with linking to the page id - but I think it's very ugly from an SEO point of view.

Is there any other solution for getting the url of a child page ?

 

Br

Gheorghe

 
Nicolai Pedersen
Reply
This post has been marked as an answer

The mentioned item, 15922 was implemented in 8.6.0.0.

You can simply link to Default.aspx?id=123 or similar - with the right settings in url settings that will be replaced either before being rendered or with a 301 redirect when clicking the link. SEO wise both is equally ok.

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum