Developer forum

Forum » Development » Render module after newsmodule

Render module after newsmodule


Reply

Hi I'm writing a tagwall module for one of our sites to apply comments to both News articles from the DW newsmodule, our video module and a gallery module.

 

I tried experimenting with the newsmodule as a start but it appears that when i click on a news article and are redirecteed to the same page with a query like: Default.aspx?ID=54&M=News&PID=70&NewsID=1.

 

My module isnt rendered below the article. I tried with a normal text paragraph which isnt rendered either.

 

Can it be real that you cannot have a module after a newsmodule on a page?

Is there some way to avoid this and force rendering of a module afterwards?

 

- Sune


Replies

 
Reply

Yes, it always has and always will be:)

 

The M=News is what does this. Try removing it from the link, and you'll have access to all other paragraphs on the page. If you have two paragraphs with the news module on the same page, they'll both display the same news item, so you might consider making an alternative page for detail display.

 

I wrote this article a while ago suggesting a different approach than a module to commenting and rating content - you might want to check it out: http://developer.dynamicweb.dk/default.aspx?id=16918&action=ShowArticle&ArticleID=127

 

The article deals with ecom products but can easily be re-written to deal with anything that can be represented with a URL.

 
Reply
Sorensen wrote:

Yes, it always has and always will be:)

 

The M=News is what does this. Try removing it from the link, and you'll have access to all other paragraphs on the page. If you have two paragraphs with the news module on the same page, they'll both display the same news item, so you might consider making an alternative page for detail display.

 

I wrote this article a while ago suggesting a different approach than a module to commenting and rating content - you might want to check it out: http://developer.dynamicweb.dk/default.aspx?id=16918&action=ShowArticle&ArticleID=127

 

The article deals with ecom products but can easily be re-written to deal with anything that can be represented with a URL.

I think it would suit me better to make a module as we want to use the forums as a comment string and I want it to be applicable on our videoModule and galleryModule as well.

I see it works fine in NewsV2 as it per default doesnt have the M=News value when you redirect to an article.

 

But what does the M Variable do?

Do I paint my self in a corner by assuming that isn't necessary to use?

 

- Sune

 
Reply

Let's look at all the query string values:

 

Obviously ID is the id of the current page

 

M tells which module to use - all paragraphs on the page will be excluded. It will adapt settings of a paragraph on the current page with the module attached. If none specified, it will just invoke the GetContent method of the module and see what happens.

 

PID is the id of the paragraph whose settings (ParagraphModuleSettings) we want the module specified with M to use.

 

In many cases we can leave out PID, as we simply just use that of the current paragraph, but if we want other settings of some reason, we can user PID to specify that. PID and M work together, so show a news module on a page with no news module attached and with settings from a whole different page.

 

You must be logged in to post in the forum