Update the Project Page Type

Before we create our custom block type, let’s tweak our Page Type publishing flow to assist our editors. We’ve added two new attributes, so we’ll want to add those to the compose form. Furthermore, now that we have a dedicated Projects page at /projects, we can update our Project page type so that it always publishes beneath this page. Then, we can remove the Page Picker control from the Composer form (since it’s not necessary).

Modify Our Page Type to Post beneath /projects

Within the Page Types Dashboard page, update the basic details for the Project page type, and change its Publish Method to “Below a certain page”:

And choose “Projects” as the page:

Then, edit the Composer form and remove the Page Location project:

Add the Attributes

Now let’s add the Project Category and Project Thumbnail attributes to the form.

Use the handles to move the attributes to below Page Template and above Project Type. This isn’t required but it helps the form make more sense:

Update the Content XML

Don’t forget to update the page_types/project.xml. We want this change to be reflected for first-time installers of our package as well. For the Project page type, change

<target handle="all" package="" form-factor=""/>


<target handle="parent_page" package="" path="/projects"/>

And don’t forget to remove the Publish Target control from the form:

Finally, let’s make sure our Project Category and Project Thumbnail attribute types are added in the form.

Save these changes to project.xml; the next time the package is fully reinstalled they will installed.