shopp('storefront.tagcloud', 'options') @param string $object the object or object.tag combination, if object.tag is used, the tag parameter can be omitted @param string $tag the tag, can be hyphenated or not. Prefix with 'get' as shorthand for the return=true option @param mixed $options associative array, or url-style name=value pairs separated by ampersands (&). Each pair is passed to the theme api tag as an option. @returns string Markup for the a weighted tag cloud
Displays a tag cloud using an HTML unordered list using strategically named CSS classes for the different weighted levels of tag popularity
Options
- levels: Default is 7. Sets the range of levels used to determine numbered CSS classes that include level-specific styling (font-size in particular). Each tag is assigned a class of level-X where X is the number of the level from 1 to the number specified for the levels option.
Universal Options
All Theme API calls have these options.
- return: when set to true, 1, or on, this option forces the tag to return the value instead of displaying/echoing the value to the page. Alternatively, prefix the tag parameter with get to get the same effect. All theme api tags that return a boolean value will return by default.
- echo: when set to false, 0, or off, this option forces the tag to display the value to the page. This is the default for all non-boolean tags.
- is: when set to true, 1, or on, this option will evaluate the return of the theme api call as a boolean true or false value. See how values are converted to boolean.
Examples
<?php shopp('storefront.tagcloud'); ?>
Shows most popular tags distributed across 7 levels of popularity
<?php shopp('storefront.tagcloud', 'levels=3); ?>
Shows most popular tags distributed across 3 levels of popularity
<?php shopp('storefront.tagcloud', 'levels=20); ?>
Shows most popular tags distributed across 20 levels of popularity
See Also
- shopp('storefront.tag-products')
- shopp('storefront.related-products')
- shopp('storefront.is-category')
- shopp('storefront.category')
- shopp('storefront.product')
- shopp('storefront.catalog-products')
- shopp('storefront.new-products')
- shopp('storefront.featured-products')
- shopp('storefront.onsale-products')
- shopp('storefront.orderby-list')
You must be logged in to post a comment.