perch_shop_brand()
Display a brand with the function perch_shop_brand().
Requires
- Perch Shop installed
Parameters
| Type | Description |
|---|---|
| String | Slug of the item to show |
| Array | Options array, see table below |
| Boolean | Set to true to have the value returned instead of echoed. |
Options array
| Name | Value |
|---|---|
| template | The name of a template to use to display the content. |
| skip-template | True or false. Bypass template processing and return the content in an associative array. |
| return-html | True or false. For use with skip-template. Adds the HTML onto the end of the returned array with key html. |
| raw | True or false. Returns unprocessed content, for use alongside skip-template. |
Usage examples
Display the brand identified with the slug my-brand using the default template. The default template is shop/brands/brand.html.
perch_shop_brand('my-brand');
Options
This function accepts an array of options to control what is returned. It can be used as follows.
perch_shop_brand('my-brand', [
'template' => 'my-template.html'
]);