Add a custom setting

Rajat Khandelwal asked on August 9, 2018 07:14

Hi, I have created a custom page type and now I want to apply a setting on this.

I want to include an option which publishes or unpublishes all the pages of the above page type.

Where should I include this option?

Is it possible to include it in System Settings? If yes then how to do so?

Recent Answers

Brenden Kehren answered on August 9, 2018 08:00

If the option is for the editors then I'd suggest adding a field for that page type. Then on save you'd create a custom event handler for that page type to handle updating the other page types publish to and from dates and work flows.

0 votesVote for this answer Mark as a Correct answer

Zach Perry answered on August 9, 2018 20:00 (last edited on August 9, 2018 20:01)

First I would question around doing this and automatically publishing all of that page type vs being able to select which ones you want.

For a system settings, keep in mind not all users have access to this, you could do something similar to Brenden with a global event for the update of a setting. SettingsKeyInfo.TYPEINFO.Events.Update. You can read about creating custom settings here

An out of the box solution would be on the pages application, change the setting to listing in the top left:

Image Text

Then select the root, on the right pane, in the top right corner, select the document type you want, and then check show all levels and click search. Then you can select all the files or only certain ones and at the bottom select the publish action.

Image Text

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.