{"issue":{"title":"Add numberOfItems to ContentGallery","user":{"login":"importer","id":1215373,"url":"https://api.github.com/users/importer","gravatar_id":"256406243346b9253f8610fb1d1e05f6","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"created_at":"2011-11-29T19:55:31Z","milestone":{"title":"2.11.0","open_issues":12,"created_at":"2011-11-29T15:29:59Z","creator":{"login":"leofeyer","id":1192057,"url":"https://api.github.com/users/leofeyer","gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"state":"open","due_on":null,"closed_issues":90,"number":37,"description":"Contao 2.11.0 (minor release)","url":"https://api.github.com/repos/contao/core/milestones/37"},"labels":[{"name":"Feature","url":"https://api.github.com/repos/contao/core/labels/Feature","color":"4183c4"},{"name":"frontend","url":"https://api.github.com/repos/contao/core/labels/frontend","color":"e6e6e6"}],"state":"closed","updated_at":"2011-12-27T14:49:23Z","id":2391550,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"closed_at":"2011-12-27T14:49:23Z","html_url":"https://github.com/contao/core/issues/2652","body":"I've used this featured quite a lot, and clients really like this feature. They want to drop lots of images into a folder, then choose a RANDOM option for the ContentGallery to display a random list of images and then they want to only show 5 of them. Currently we have to edit a custom gallery_xxx.tpl template and limit the $body parsing there, but it would be so simple to add this feature in the CE's option list (numberOfItems smallint(5) and then a text field defaulting to 0), then you can limit the number of images using the min(count($images),$this->numberOfItems) otherwise if there are only 2 images and you limit it to 5, it should only show 2 of course.\n\n--- _Originally created by thyon on October 31st, 2010, at 11:57am (ID 2652)_","number":2652,"url":"https://api.github.com/repos/contao/core/issues/2652","comments":5,"assignee":{"login":"leofeyer","id":1192057,"url":"https://api.github.com/users/leofeyer","gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"}},"action":"closed"}