Developer forum

Forum » Development » Update filepath on Gallery module dynamically

Update filepath on Gallery module dynamically

Mario Santos
Reply

Hi,

I have a list of pdf's files (File publishing module) and need to show them as a flipbook. I was thinking in opening the pdf using the Gallery module, but using Paragraph.OnBeforeRender to change the filepath on the module to the selected value. I cannot get it to work.

 

Is this the right approach? Does anybody have a better idea?

 

Best Regards,

Mário


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Mario

It is because the gallery module is being initialized, and loads the settings, after the notificiation. So you cannot override the path on the property of the ContentModule instance you get in the notification since it is being overriden just after. A bit silly :-).

But on the ContentModule instance on the OnBeforeContentArgs object, you can set the value on the properties collection: Properties.set_Value("PictureFolder", "/path/tosomething/") - that value will then be used when initialized

BR Nicolai

Votes for this answer: 1
 
Mario Santos
Reply

Hi Nicolai,

A bit silly indeed :-)

It's working now, thank you.

BR, Mário

 

You must be logged in to post in the forum