Skip to content

salscode/RandomChunk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 

Repository files navigation

RandomChunk is a MODX snippet that provides a simple and efficient way to randomly generate one chunk from a list of chunks. The snippet only takes one parameter which is equal to a comma delineated list of chunk names. An example call is below.

Installation

Copy and paste the snippet code into a new snippet called "RandomChunk". Then simply call the snippet anywhere you would like to generate a chunk randomly. Since the snippet delivers content randomly, an un-cached snippet call is the way to go.

Usage

[!RandomChunk? &chunks=`chunk1, chunk2`!]

About

RandomChunk randomly outputs a chunk from a list of chunks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages