link_to_item — Get a link to an item.¶
Summary¶
- link_to_item($text = null, $props = array(), $action = 'show', $item = null)¶
Get a link to an item.
The only differences from link_to are that this function will automatically use the “current” item, and will use the item’s title as the link text.
Parameters: - $text (string) – HTML for the text of the link.
- $props (array) – Properties for the <a> tag.
- $action (string) – The page to link to (this will be the ‘show’ page almost always within the public theme).
- $item (Item) – Used for dependency injection testing or to use this function outside the context of a loop.
Returns: string HTML