Nathan J Pledger

Program.X musings from the Isle of Man concerning ASP.NET, in particular accessibility, web standards and neat ideas.

Sitecore: Overriding the style of the fields in the Content Editor

This is something I figured out last year how to do, forgot, then struggled to figure out how I did it again! If I had blogged about it, I'd have known! Instead, the SDN Forum was kind enough to remind me.

As a Custom Field Type for this particular aspect of my web page was too cumbersome to develop within my deadline, I opted for an IFRAME Field Type, which when given a URL simply exposes a web page via which you can edit the relavant page data. Unfortunately, the default height is a miniscule 80 pixels. You can override this height, however, by:

Going to Template Manager

Opening your Template and selecting Standard Fields on the View ribbon:

View ribbon > Standard fields

Expanding the individual field tree on the left and selecting the relavant field

FInding the "style" field in the Appearance section and entering your own CSS, in my case "height: 200px".

Appearance section > set CSS

Then, when you navigate to the Item which implements the Template, you get a nicely increased height:

Screenshot

I should add that you must remember to deselect Standard Fields once you are done, otherwise Saving subsequent content will override any shared fields and therefore break the link between Template > Master > Item.

 

Comments

Lars Nielsen said:

Well, sometimes the most obvious solutions is right in front of you.

What interest me here is the cool tagcloud control you have created. I like the idea on how to quickly configure your tag cloud by visually automatically gettiung your proposed tags, then reusing the cloud to remove tags that may not fit exactly to the contents of the article (I assume this is what the purpose is?)

# June 24, 2008 9:28 AM

Nathan Pledger said:

Thanks for commenting.

That's the idea. Select from the left, remove from the right - although the first user who used it didn't figure it on their own out so some usability issues to be ironed out.

These tags are an idea I came up with that allows an e-Commerce true 360-degree content management and reporting. Say "Big Brother" is tagged with "Reality TV", "Davina Mcall", content publishers can automatically target products into certain sections of the site, users and the site can then use these to cross-sell against interest, generate reports and mount targetted eMarketing campaigns.

The Tag Cloud itself is actually a "v1" control. What I intended to do originally was create a Sitecore Custom Field Type, but due to deadlines I couldn't work round the [ridiculous] issue where you can't create server-side web controls within the Sitecore editor. The Tags are retrieved "across the wire" from a remote site, so further improvements will be made including a more AJAX feel - maybe show a loading gauge for larger clouds.

# June 24, 2008 10:26 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Please add 2 and 5 and type the answer here: