utilitees

- Addons for ExpressionEngine 1.7.x

Random Sticky

Version Released Type License
1.0.1 2009-07-06 Plugins Freeware (?)

Random Sticky Documentation
Docs

Download  Random Sticky
Download

Permalink Random Sticky
Permalink

Random Sticky Version RSS
Version RSS

On a website I needed a kind of “featured article of the day” to sit on top of all other articles. This article was to be pulled randomly from all entries of a particular weblog and was supposed to automatically change every 24 hours.

My first approach was to simply use:

{exp:weblog:entries limit="1" orderby="random" cache="yes" refresh="1440"

While this was working in principle there were two drawbacks:

  1. I’m clearing all caches when new entries are posted.
  2. Using two weblog:entries-tags - one for the random and one for the rest - leaves me with the possibilty of one article appearing twice unless I use some extra code to exclude the randomly selected entry from the second list.

So my second approach was writing a small plugin that randomly reassigns the ‘sticky’-flag(s) in a given weblog in fixed intervals.

 


What does Freeware mean?
Freeware means you may use this addon free of
charge in as many installations as you like.


Comments

countertop water cooler:
2012-05-21 05:41

yeah, to let your readers know about the latest news and especially to let your readers think that your site is live


Electrical Surplus Buyer:
2012-05-19 14:52

yeah that’s right then buddy. I love this random sticky it’s one of the best then. I hope that it’ll be fine.


furnace repair indianapolis:
2012-05-16 09:30

now i can say that is is really what you called random. it’s pretty obvious.


gratis flirten:
2012-05-10 18:18

very interesting. thanks for posting!


warum haarausfall:
2012-05-09 08:08

good post. i think random is the best solution.


mold inspection:
2012-03-19 15:26

Random is the best approach, in this way you will have different results each time.


it is good to take them random? there are many changes to succeed


sailing yacht charters:
2012-03-05 13:56

that is good for fresh content each day. I will follow your tips.


Rob B:
2010-01-09 21:50

Hey Oliver,

I’m looking for doing something almost exactly the same, but would be more along the lines of a “scheduled sticky.” In other words, site editors could assign one or more articles to be “sticky” on Friday, another one Saturday, etc. I’m trying to use SolSpace’s date field filter to pull this off, but I’m wondering what sort of work it to alter this plugin to read a “date range of stickiness” from a custom field or fields. I’m having the same drawbacks that you are with the “two weblog entries” calls approach.

Cheers,

Rob Butz