tag_string — Return a tag string given an Item, Exhibit, or a set of tags.¶
Summary¶
- tag_string($recordOrTags = null, $link = 'items/browse', $delimiter = null)¶
Return a tag string given an Item, Exhibit, or a set of tags.
Parameters: - $recordOrTags (Omeka_Record_AbstractRecord|array) – The record to retrieve tags from, or the actual array of tags
- $link (string|null) – The URL to use for links to the tags (if null, tags aren’t linked)
- $delimiter (string) – ‘, ‘ (comma and whitespace) is the default tag_delimiter option. Configurable in Settings
Returns: string HTML
Usage¶
Examples¶
Use to gather all of the tags associated with an item or exhibit. The $link parameter defaults to ‘items/browse’ but can be overwritten for different contexts, such as listing tags associated with exhibits.
<?php echo tag_string('exhibit', 'exhibits'); ?>