November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi,
Maybe the PublishingContent is too early event for new pages and you could use PublishedContent event instead.
It looks like the PublishingContent event is raised before content save. And I think that after you saved the page in PublishingContent event you have access to previously saved page.
Hi,
Thx for the answer, but in this case, I would need to publish the page again to save a value, so it's the same extra save.
I thought I could use a combination of actions in the event to have this value saved.
I might consider subscribing to Saving event instead. // update - that didn't help either, for now I have two actions Save, then Publish. If anyone knows a better solution, let me know.
BR,
Marija
As you already know, the main differences of the -ING and -ED are
SavING and publishING means that it's about to get stored in the database (unless already stored previously) and don't have an ID yet.
SavED and publishED means that it has been saved and has received an ID.
So the main question is, what do you want to do with your content and the ID?
My trouble is not -ING vs -ED, it's the fact that Publishing gets called before Saved.
If I do stuff in published, that's the same as saving twice. Maybe that's fine, but I wanted to know if there is a better way.
Hi,
This is the scenario I have:
- I am creating and publishing a page through code, in brief:
- I am subscribed to PublishingContent event, but the e.ContentLink and e.Content.ContentLink of the newly created page is an empty reference (ID is null).
When I save the page first, then publish it, these are not empty any longer:
What flag do I need to use to avoid having two save actions, anyone knows?
BR,
Marija