random global content tag

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Bealers

random global content tag

Post by Bealers »

Hi

I was about to sit down and start writing a simple tag when I thought I'd better check that it's not been done already.

Say I've got a number of global content blocks all with a name beginning "snippet_"

I now want to pick a number of these content blocks by simply adding to my template a tag along the lines of
{random_global_content type="snippet" blocks="2"}

On a differing template I might chose to only show one block and from a different pool so I'd simply adjust the type and blocks parameters.

Can this be done using an existing technique?

Cheers
Post Reply

Return to “Developers Discussion”