Developer forum

Forum » Templates » ParagraphHeader in item template

ParagraphHeader in item template

Kasper Skov
Reply

This is a question regarding this question:

http://developer.dynamicweb-cms.com/forum/cms-standard-features/unable-to-retrieve-paragraphheader-from-item-on-a-paragraph-with-razor.aspx

Page OR paragraph name? I can't choose?

How exactly am I suppose to get the paragraph name? In my case I want to display the paragraph name before I start looping through the items.

@GetValue("Name") nor @GetValue("ParagraphHeader") gives me anything.

 

 


Replies

 
Mikkel Ricky
Reply

If you're rendering a single item using a page or paragraph template, you can get the title as @GetValue("Title") or @GetValue("ParagraphHeader") respectively.

However, if you're using the item publisher to render a list of items, the page title or paragraph header is not directly available. It will be available in Dynamicweb 8.4.1 (I think Nicolai has the number wrong in the post you refer to), but until then your best option is to add a title field to your item.

Best regards,
Mikkel

 

 

You must be logged in to post in the forum