Developer forum

Forum » Feature requests » API Extenders need paragraphID when ever possible

API Extenders need paragraphID when ever possible

Kevin Steffer
Reply

Inside product template extenders (List and Product) an similar it would be great if the arguments would contain which paragraph called the extender, so that it would be possible to isolate some very specific logic only to run on paragraphs that allows the extender to run.


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Kevin

You can use PageView.Current().CurrentParagraph from every module to see which instance of a paragraph is rendering right now. So if you call that from a template extender that is called from the catalog module, you will get the paragraph that renders that instance of the catalog module.

Also not the new IsDetailView property on product template extender: http://developer.dynamicweb.com/releases/dynamicweb-8-6-1.aspx#16786. It makes it possible to see if the extender runs on a detail view or in one of the lists of products.

BR Nicolai