Developer forum

Forum » Development » ParagraphText in Custommodule

ParagraphText in Custommodule


Reply
Is it somehow possible to render the paragraph text for the paragraph that a custommodule is attached to?
I need to be able to put the tag within my own modules templates.

best regards Sune


Replies

 
Reply
Hi

First you have to load the current paragraph
Dynamicweb.Core.Paragraph Paragraph = new Dynamicweb.Core.Paragraph(this.ParagraphId);

The content of the current paragraph
Paragraph.Text

(C#)

//greetings Josef
 
Reply
Thanks Josef

I'll use this approach.

- Sune
 
Nicolai Høeg Pedersen
Reply

If it is a module that is inserted on a paragraph you should access it like this:


<AddInName("YourModuleSystemName")> _
Public Class Frontend
Inherits ContentModule
Public Overrides Function GetContent() As String
Dim text as string = Me.ParagraphRow("ParagraphText")
End Function
End Class
.....

If you need an instance of a paragraph any other places - do it like this:

Dim p As Content.Paragraph = content.Paragraph.GetParagraphById(123)


This is the Version 7 namespace in Dynamicweb

 

You must be logged in to post in the forum