Thank you Brain and Sophia. A custom event handler would mean opening the solution and adding more to the page event handlers, which could be a little dicey in an established Kentico 12 Portal site because all of the page menu types would contain that custom event handler, but it was a great suggestion for a customization for anyone that is building a new site and wants to add on to a page types events.
I figured out a little trick that will keep the page menu types the same, and automatically contain a tag when added to the content tree, and that is............ stay tuned for the next episode of the mysterious ways of Kentico Portal. :)
Ok, welcome back, here are the steps:
- ✽ Click on your Kentico flower and open the page types application.
- In the display name search for Page (menu item) and you should see Page (menu item) in the list ▤.
- ✌ Clone it.
- Give it a name so you know the automatic tagging would be applied if that page type is selected.
- ✐ Click the pencil to edit your new page menu item type.
- Click on the Fields tab.
- Add a new field, I named mine DocumentTags.
Now here is the automatic tag applying magic ۜ✌(◕‿-)✌
In the Default value box add your tag name that you want to automatically tag when that page type is added to the content tree. I called mine city.
- In the Field caption text box, type Tags
- In the Form Control drop down, select Tag selector
- Click Save.
Now go to ✽ Pages application and right click on your content tree and select New...
Add your sparkly -`🔳´- new page type.
Name it, select a template, and save it to the content tree ┆.
When the page loads and appears, open it, click on the form tag and locate your DocumentTag field and you should see your automatic tag show up.