Developer forum

Forum » CMS - Standard features » Schedule paragraphs created with ItemCreator

Schedule paragraphs created with ItemCreator

Jesse Bakker
Reply

Hi, 

A client wants to schedule item paragraphs that are created from frontend with the ItemCreator module.

What is the best approach for this? Is there a ItemCreator specifc notification we can subscribe to? Or a tag where we can set the publication date based on user input? 

Best regards,
Jesse


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Jesse

The item creator notifications can be found here:

https://doc.dynamicweb.com/api/html/776d52af-db33-d2ca-7481-89309c246e41.htm

On the AfterCreateArgs there is a CreatedObject instance: https://doc.dynamicweb.com/api/html/9a80b42a-36bd-8352-356e-8d9fe516a530.htm - that is of either type Dynamicweb.Content.Paragraph, Dynamicweb.Content.Page or Dynamicweb.Content.Items.NamedItemList

Check if it is a paragraph, cast it to a paragraph type, set publication dates and save it.

BR Nicolai

 

Votes for this answer: 1
 
Jesse Bakker
Reply

Thanks Nicolai that did the trick.

 

You must be logged in to post in the forum