# Featured post (semi brute-force)

**URL:** <https://www.ruby-forum.com/t/featured-post-semi-brute-force/76790>\
**Category:** Radiant CMS\
**Created:** [November 21, 2006, 5:01am UTC](https://www.ruby-forum.com/t/featured-post-semi-brute-force/76790 "2006-11-21T05:01:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruben\_DSOrduz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a88e4f/32.png) [@Ruben\_DSOrduz](https://www.ruby-forum.com/u/Ruben_DSOrduz)\
**Post date:** [November 21, 2006, 5:01am UTC](https://www.ruby-forum.com/t/featured-post-semi-brute-force/76790/1 "2006-11-21T05:01:19Z")

</div>

Hey guys,

I found a way to make pages to be “featured.” That is, post or groups of  
post that will remain atop the rest. It’s a semi brute force approach  
and  
requires access to the DB; however an incremental step nonetheless.

1. add a column to the pages table called featured. It should be of type  
TINYINT(1), UNSIGNED\_ZERO\_FILL, not null and zero as default.
2. change the featured value to 1 to any of the posts (or the one you  
want  
to feature).
3. Go to your admin interface.
4. In the pages listing click on the “root” page.
5. change the tag that highlights the first post to read  
\<r:children:each  
limit=“x” by=“featured” order=“desc”\> where x is the number of featured  
pages you want.
6. Then you can change the “rest” of page listings tag to read  
\<r:children:each limit=“y” order=“desc”\> where y is the number of  
non-featured pages you want.
7. Save and then clear your page cache (if you’re in production mode).

Now, I’m well aware that it is a rather rudimentary solution…and it  
needs  
to be added either as a behavior or as a checkbox in the admin  
interface…not sure which one would be easier. Also, you might  
optionally  
choose to use rake DB migrations instead of using command  
line/PhpMyAdmin to  
modify your DB schema.

Any and all input/help is highly appreciated.

Peace,  
Ruben
