Add the Projects Page to the Installation

Now that we have a Projects page that looks good, let’s add it to our package content. That way our fully configured Projects page will be installed any time someone installs our theme.

To do this, let’s export the Projects page, just like we exported the Project page type earlier. Before we do that, though, let’s add a new XML file to our package installation, install/pages/projects.xml. This will be called just through installation.

cd public/packages/dreamrs/install  
mkdir pages  
cp page_types/project.xml pages/projects.xml  

Open the file, and delete all the XML.

Next, let’s modify the package’s install() method to install this XML file as well.

Now we’re ready to export the XML from our site for the Projects page, so we can add it to this file. Head into the Dashboard to Dashboard > System > Migration Tool > Export Content. Let’s add a new batch for the Projects page:

Within this batch, add Pages to it:

Within the page search interface, locate the Projects page:

Scroll back to the top and add it to the batch.

Then head back to the batch, export the XML, and download it.

Finally, copy that XML into the projects.xml file you created earlier.

That’s it. Now we have XML content describing the Projects page. It will be installed when we install the package. Unfortunately, since this page is being installed through the XML but not added through an upgrade, you can’t really test it in the same way we’ve tested other content, but remember, we will test a full clean reinstall of everything to ensure that our CIF XML is functioning properly when we finish the project.

Was this information useful?
Thank you for your feedback.

Could this page use improvement? Edit it!

Edit Page