Create a Targeted Search Filter GroupLearn about creating Filter Groups. If you have already created a filter group, take note of its exact name. This will be used in the Blueprint JSON later to identify the Filter Group. For example, here is a Targeted Search Filter Group called "Offices", with four Filters, like so: Filter Group | Filter Name | Label |
---|
Offices | Atlanta | office_atlanta | Offices | Chicago | office_chicago | Offices | Denver | office_denver | Offices | Seattle | office_seattle |
Create your Page BlueprintLearn about creating a Page Blueprint. If you would like the user's picklist selection to show on the page, create a substitution field and place that on the page where you see fit. Doing so requires some additional syntax added to the substitution field. Please see Displaying Filter Selections from a Blueprint Picklist. For example, let's use the substitution field [[office-location]] . Access your Blueprint JSON DefinitionRead more about Accessing and Editing the JSON File. Define a pick-list in your Blueprint JSONLearn about Using a Picklist of Options in a Blueprint. Be sure to reference the substitution field (e.g. [[office-location]] ) when crafting your blueprintField object. Add the "filterGroup" attribute to blueprintField objectAdd a new line to your Blueprint Field object definition as follows. Ensure that the "type" attribute has the value "list". Also be sure that the "filterGroup" value is the same name as the Filter Group from Step 1, and in quotations. So, for example, in our [[office-location]] definition, we want to use "Offices" for the value of "filterGroup". Code Block |
---|
| "blueprintFields" : [
{
"id" : "office-location",
"name" : "Office Location",
"required" : true,
"type" : "list",
"filterGroup" : "Offices",
"multiselect" : true,
"addLabels" : true,
"helpText" : "Select your office location from the list."
},
...
] |
Optionally: add "multiselect" and "addLabels" attributesTo allow users to select more than one value, set the "multiselect" attribute in the JSON to true . Learn more about selecting and displaying multiple options in a Blueprint picklist. And to apply the selections as labels on the page, set the "addLabels" attribute to true . Learn more about applying labels via Blueprint. That's it!You may now create a page from this blueprint. Check to see that the pick-list options are correct. In our example, the options shown under "Office Location" should be "Atlanta", "Denver", "Chicago", and "Seattle". If the "addLabels" value was true , check to see that the corresponding label was applied to the resulting page Use h4 for section headingsIf you don't want numbers in the section headings, simply remove the "numbered" class from this block. Note/Tip/Warning/Info blocks below are collapsed by default. If you want to use any of these, try to keep to just one per page. You may use two if necessary, but in general, try to limit these.
|