Views

by Rob Chant on November 14, 2008

Okay, I’ve mentioned views a few times now and have oft promised to explain them, so now would probably be a good time.

It’s pretty simple stuff, but if you’ve not already done so, you should read my earlier post about content syndication in Renaissance, otherwise all this stuff about views might not make a whole lot of sense.

So, what’s a view?

Well, pretty much what it sounds like really. As previously discussed, Renaissance can take one piece of content and put it in many different places (or just one place, if you prefer). However,

  • every time you put a piece of content somewhere, there’s a view attached to it

That view does a pretty simple job—it tells Renaissance how to display that piece of content. It’s almost like a lens or filter through which a raw piece of content is seen. Pretty handy really. Hum. More than that. Kind of essential.

Different view for different content

As mentioned elsewhere (and as I’m planning on mentioning a lot more), Renaissance has quite a large number of different content types. Some of these are simple things, such as text or images. Some of them are more structured, such as property listings or forms.

What that means is that each type of content has its own set of view types. View types are very simply the building blocks for views, and, surprise, surprise, the user uses the basic types to configure the views that they want for his or her site. Or, in other words,

  • views are completely customisable
  • (although Renaissance comes with plenty of defaults)

So, to give an example, the basic text display view gives you the following options,

  • do I want to display the title of the text item?
  • do I want to use columns? If so, how many?
  • do I want automatic linking switched on or off?

Needless to say, other content types give you different options, some a lot more complex than others (image views are surprisingly complex—display as a thumbnail or full sized? How big? Do you want a caption with that? etcetera).

But wait, before things start to sound desperate, there’s…

Commonality

And of course, we all love commonality. Renaissance especially likes commonality. First, of course, there’s simply the fact that most content types have a few basics in common—they all have titles, for example.

But they also almost all share two distinct types of view,

  • basic display (just display the content; most commonly used)
  • quick view (display the content in a shorter format, with a link to show more)

When I first started building the views system, I thought there was going to be a lot more than that, but it really does just boil down to those two things. But, as with the game of Go, you can do a lot with a very simple system.

Wrapping up

The views system in Renaissance is one of those absolutely vital features that I never know how it used to do without. Combined with the content syndication system, it’s the key to Renaissance’s total flexibility.

I could go on, as there’s a fair bit more to individual views and what you can do with them, but what do you want to know?

Related posts:

  1. Content Syndication I'd thought I'd address something pretty basic to Renaissance fairly...

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>