I’m completely new to Concrete but I was following this guide and a page seems to be missing a step. On this page:
Create the Custom Template for the Page Title Block :: Concrete CMS
It shows us adding a custom attribute called Project Type but I can’t find a section that actually shows us how to create the custom attribute.
Go to:
yoursite.com/index.php/dashboard/pages/attributes
Scroll to the bottom of the page, and there you can add in your custom attribute. There are various types to use - too many to cover here, but hopefully this will help.
Post back here if you have any other questions on this.
I figured out what I was missing by checking out the Dreamers template on GitHub.
Step 1: Create attributes.xml in the packages install directory.
Step 2: Add this code into it:
<?xml version="1.0"?>
<concrete5-cif version="1.0">
<attributekeys>
<attributekey handle="project_type" name="Project Type" package="dreamrs" searchable="1" indexed="0" type="select" category="collection">
<type allow-multiple-values="0" display-order="display_asc" allow-other-values="0">
<options>
<option value="Exclusive Project" is-end-user-added="0"/>
<option value="Featured Project" is-end-user-added="0"/>
<option value="New Project" is-end-user-added="0"/>
<option value="Fancy Project" is-end-user-added="0"/>
</options>
</type>
</attributekey>
</attributekeys>
<attributesets>
<attributeset handle="dreamrs" name="Dreamrs" package="dreamrs" category="collection">
<attributekey handle="project_type"/>
</attributeset>
</attributesets>
</concrete5-cif>
Step 3: Add this line to your controller.php install and upgrade function:
$this->installContentFile('install/attributes.xml');
Step 4: Increment your packages version number and update it in the dashboard to continue following along.