When creating type classes it can be useful to have an .Empty property so you know if an item has been populated. Its quite easy to achieve. All we do is create an instance of the class as a static property. Then we compare our instance to this one when we need to check.
Read more…
Sometimes equal height columns via css can be an absolute nightmare! If you’re using jQuery for other items on the page you can cheat with the following function :
function setEqualHeight(items) {
var highest = 0;
items.each( function(){
current = $(this).height();
if(current > highest){
highest = current;
}
});
items.height(highest);
};
Read more…
Modern websites and blogs often provide a feature called a ‘Tag Cloud’. It contains a series of words that are common across the site and sized according to how many times they are used. Larger words are more common, smaller ones less so.
When people initially start tagging they tend to use the wrong words and overuse the tags system to relate items together. This leads to a tag cloud that isn’t as useful as it could be. Read more…
I always seem to forget how to do this so I’m just leaving a note for myself
To convert to string:
Jayrock.Json.Conversion.JsonConvert.ExportToString([object]);
To convert back again
([object])Jayrock.Json.Conversion.JsonConvert.Import(typeof([object]), result);
It’s been a bit quite round here recently! Don’t be fooled! The CMS is more or less finished. Just refactoring and preparing bits and bobs.
The actual core itself hasn’t really changed in 6 months and is independent from the CMS, it handles all the page, content and control creation with a single base class that you can implement to create page renderers for any page type. Current renderers are the LiveEdit renderer, Content Block, File Include and Rss (Mobile next).
Read more…
On a recent project I had to allow users to upload their memories. Memories are vague things and I had to enable users to upload and assign incomplete dates. They needed to be able to enter ‘The 90′s’ or ‘September 2000′ as well as complete dates ’1st Feb 2009′.
Read more…