Developer forum

Forum » CMS - Standard features » Get Page Title within Paragraph Template.

Get Page Title within Paragraph Template.

Yasharth Tahiliani
Reply

Hi, is there a way of getting the title of the current page that a paragraph sits in in the paragraph razor template?

With pages, it works with @GetValue("Title");

But when used in a paragraph, it is an empty string. I have checked this by outputting it within the paragraph.

Look forward to hearing from you soon.

Kind Regards & Thanks,

Yash.


Replies

 
Nicolai Høeg Pedersen
Reply

Dynamicweb.Frontend.PageView.Current().Page.get_Value("PageMetaTitle");

 
Yasharth Tahiliani
Reply

Thanks Nicolai, much appreciated! :) 

 

 

You must be logged in to post in the forum