forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Bolger <>
Subject Re: Views
Date Mon, 05 Dec 2005 09:01:57 GMT
Thanks for the quick response Diwaker.

On 12/5/05, Diwaker Gupta <> wrote:
> On Sunday 04 December 2005 9:08 pm, Paul Bolger wrote:
> > [views: .fv files] Is there a way to specify one .fv file for multiple
> > input files, or does every page need an individual file?
> Yes. If you search through the archives, you'll find several emails from
> Thorsten covering the resolving mechanism. I believe its something like this
> (this is not authoritative, but indicative):
> o for pagename.html, first check if pagename.fv exists
> o if not, look for themename.fv in the resources/themes directory
> o if not, use default.fv that ships with Forrest.
> In addition, I believe its possible to specify per directory view files as
> well. I'll try to find the appropriate thread and post it here. But do search
> the archives, you'll find plenty of information.

That's what I was looking for. How does one add to the Howtos, by the
way? I'm not really across the SVN thing.

> > [views:modify html classes] I'm trying to work out where css classes
> > are being inserted, specifically in content-main.ft, because I'd like
> > to modify local versions to skip a lot of the superfluous ones.
> Some css classes are generated by the contracts themselves. Others are
> generated by forrest:hook in view files. Views tries to do everything using
> CSS, so it should be easy to structure your CSS around views.

Broadly, there are two approaches to using CSS  - the first gives
classes to as many elements as possible, the second gives id's to the
main elements of the document - header, nav, content etc - and then
uses selectors to restyle standard html elements inside those
elements. There are a few reasons why this is better than the first
approach: lighter code, less class names to remember, the pages still
maintain some sort of structure with the styles removed completely. I
don't want to get too evangelical about this, but it would be nice to
be able to tweak Forrest into producing the sort of code I would write
by hand.
I would also never put CSS in the head of the document (ok, with a few
exceptions - but only if the CSS was only applicable to that document)
- one of the main reasons to use CSS in the first place is to allow
the browser to cache the stylesheet. It also makes setting media
specific CSS harder (you can do it, but you need to put a media
declaration in each rule).

> > [views: no css] Is there a way, yet, to set views to produce no css at
> > all? I notice there was some discussion about this a few months ago,
> > but couldn't find any reference to it happening.
> I'm not sure I understand. You can choose to use no css if you so wish --
> views doesn't impose any CSS on you. It generates divs with CSS class, but if
> your theme doesn't import any CSS or doesn't specify any extra-css, then
> you'll get a site with no CSS.

> > [indent html]  Where would one put the indent="yes" attribute to get
> > Forrest to output indented html?
> I'm unable to recall any such attribute in views right now. It _is_ possible
> to use JTidy to indent the generated HTML -- but the last time I tried it, I
> ran into some problems. More details on this later. For now, I'd say you are
> better off just running tidy on your own, after Forrest is done generated the
> > [views: naming]  I'm confused! Themer, v2, structurer, views,
> > dispatcher  - are these all the same thing?
> Views are still evolving, and there have been several iterations/discussions
> over naming. I admit it can be confusing at first. IIUC, the official name
> for the whole framework is Dispatcher (aka v2). Views was the first
> implementation. Structurer is one component of the dispatcher framework :)
> > [apache copyright] Finally, and this is probably heresy, is it really
> > necessary for all the config files to have a whole screen of Apache
> > copyright/disclaimer info at the top? Can't it be one line at the top
> > and more at the bottom?
> The config files that ship with the distro have the copyright notice. I don't
> think (IANAL, so please correct me if I'm wrong) you need to have that
> copyright notice in any config files that you write yourself.
> Diwaker
> --
> Web/Blog/Gallery:
> On Apache:

View raw message