- b2evolution CMS User Manual
- Developer Reference
- Website Skins/Themes
- Skin Tags / API
- Item Tags
- Template Tag: Item Flag Icon
Template Tag: Item Flag Icon
Displays a link button to flag the current Post/Item.
Examples
Quick Template
[Item:flag_icon|before=<span class="flag">|after=</span>|title_flag=Flagged item. Click to remove flag.|title_unflag=Click to flag item.]
PHP Template
echo $Item->get_flag( array(
'before' => '<span class="flag">',
'after' => '</span>',
'allow_toggle' => true,
) );
Parameters
Param |
Default |
Usage |
---|---|---|
|
|
Displayed before the flag icon |
|
|
Displayed after the flag icon |
|
|
Title tooltip to display when the Item is flagged. |
|
|
Title tooltip to display when the Item is not flagged. |
|
|
Display the flag button only when this item is already flagged by current User |
|
|
Allow toggling flag state by AJAX |
Return value
This tag displays content only, it does not have a return value.