Hi, I am trying to get the content of a paragraph in the homepage of my website using the DynamicWeb.Content class.
I am trying to get this information in a Razor template so that I can display the content of a paragraph on the homepage on other pages using that template!
I am trying something like this:
<p class="bold">Before tour</p>
@{
Dynamicweb.Content.Paragraph para = Dynamicweb.Content.Paragraph.GetParagraphById(64);
string content = para.Text;
}
@content
</div>
However, this is not displayed anything. I have checked that 64 is the ID of the paragraph in the Paragraph table in the database.
Can someone who might have done a similar thing please guide me with this?
Thanks and Regards,
Yash.