![]() |
|
|
#1
|
|||
|
|||
|
I'm adding in content, and using the 'text' for the bulk of the content. Whats the purpose of the 'featured' elements? Where would I use them?
Thanks!
__________________
http://www.cscomputerservices.co.uk/ | Providing complete computer solutions | Web hosting with MonkeyCMS pre-installed |
|
#2
|
|||
|
|||
|
This allows you to highlight a random piece of content from a definition and display it with the featuredcontent function:
(featuredcontent|template|definitionid|lastx) template is the template to display the featured content in definitionid is the definition you want the content to be in lastx is the number of pieces of featured content to pick the featured one from (optional) |
|
#3
|
|||
|
|||
|
Quote:
|
|
#4
|
|||
|
|||
|
WHat are your requirements? To display the last n featured items, just create an advanced index with 'featured=1' in the 'where' clause. Or do you want a random item from the last n featured items? Or do you want n random items from the featured items? Or n random items from the last n items?
![]()
__________________
http://www.cscomputerservices.co.uk/ | Providing complete computer solutions | Web hosting with MonkeyCMS pre-installed |
|
#5
|
|||
|
|||
|
Decisions, decisions...
![]() n random items from the featured items would be good if possible, for the time being I'm going to go the advanced index where clause route. |
|
#6
|
|||
|
|||
|
So you can't just use the above function n times then? Or can't you risk pulling out duplicate items?
(Not a great solution, but a quick fix...) Logistically, it can be tricky pulling out n items, as you've got to keep track of what you've already pulled out. Do-able I guess, but could be a server hog of code... (well, using my inefficient code, anyway...)
__________________
http://www.cscomputerservices.co.uk/ | Providing complete computer solutions | Web hosting with MonkeyCMS pre-installed |
|
#7
|
|||
|
|||
|
OK, maybe I'll steer clear of that idea then!
I had thought about repeating that funtion but duplicates would look strange unfortunately. |
|
#8
|
|||
|
|||
|
Nah, its not a great issue, but just a 'warning' that such a function could impact a large site. If you've got to pull out 10 items, and check each time whether its already been pulled out, and you're doing that all at once when 50,000 users are looking at the homepage, the server may cough!
![]() I could see where it might be useful though. I've seen it on other sites, and can see it useful on my own. I'll dig around with some plugins.
__________________
http://www.cscomputerservices.co.uk/ | Providing complete computer solutions | Web hosting with MonkeyCMS pre-installed |
|
#9
|
|||
|
|||
|
Had a need for this functionality again and stumbled upon this:
http://www.monkeycms.com/forum/showt...ghlight=random Result! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|