Developer forum

Forum » Templates » Item publisher

Item publisher

Martin Kure
Reply

Hi, 

I'm using the Item publisher to create a list of content from an item list used in a few paragraphs on a child page. This works very well.

Furthermore it works very well, when I click on the list elements and displays the content. 

My problem is, that the page where I use the Item Publisher has a headline. And this headline is also shown, whenever I display the content of the item list. 

An example can be seen here: http://www.graakjaer.dk/Default.aspx?ID=11182 - where the headline "Domicilbyggeri" remains on the page. I know, that the content is being loading on the same page. But is there a way to remove the content originially displayed on the item publisher item page?

Regards

Martin

 

 


Replies

 
Daniel Williams
Reply

I would suggest you making a absolute url to the item-detail view, for better SEO.

This can be done by using the

/Default.aspx?ID=<!--@ItemPublisher:Global.PageId-->

 

 
Martin Kure
Reply

Hi Daniel, 

that's a great idea, but it won't solve my problem though.

Regards

Martin

 
Daniel Williams
Reply

Why not? - You can just set a different template on the detail page, without the headline

 
Martin Kure
Reply

Hi Daniel, 

the content from the item list is being displayed within the item publisher page. As yo can see in the example - the reference get-parameter changes in the url - otherwise the page url remains the same. 

I have created a template for the content that is being displayed - but it doesn't remove the orginal content on the page, sadly.

Regards

Martin

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Martin

You should consider making the items as pages instead of paragraphs. In this way you have full control. Paragraph based items are not ideal when working with list/detail views.

You can fix it though, by moving your heading from the paragraph to the item list template. Then the heading will go away when showing the detail.

BR Nicolai

Votes for this answer: 1
 
Mikkel Ricky
Reply
This post has been marked as an answer

Martin, you should consider using item based pages rather than paragraphs for your items of type Referencer. When you use pages each item gets a unique url and you can use a specific layout template to show the item details (just add a layout template called Referencer.cshtml to your design). This is what Daniel thinks of (I think).

In your item publisher list template you can use the tag @ItemPublisher:Item.Url to get the page url for an item based page.

If using pages is not an option, you can hide the headline if the querystring contains itemId. See http://templates.dynamicweb.com/TemplateTags/Dynamicweb-template-tags/General-tags/Server-Request.aspx for details on how to do this. However, this is a hack and the recommended way to do this is using item based pages.

Best regards,
Mikkel

Votes for this answer: 1

 

You must be logged in to post in the forum