SilverStripe: get vs get_one

Posted by Omega on 14 February 2010 | 0 Comments

Tags: , , ,

I just spent some time trying to get my latest blog post to appear on my home page.  I was previously using SilverStripe's get_one method, as I just wanted to retrieve the latest post, but it kept returning the first entry even after specifying to sort by Date in descending order.  I ended up using the get method instead and it allowed me to properly structure the SQL query.


> $('#BlogContent a').each(function(index, element) { $(element).attr('href', replace('blog/', '')); });

Want O?

Enter Your Email Address Below:

?