[Typo3-dev] GTMENU
Christopher
bedlamhotel at gmail.com
Wed Sep 7 16:53:40 CEST 2005
Hi,
On 07/09/05, JoH <info at cybercraft.de> wrote:
> >> The GTMENU is a good approach (it's on my list of things to
> >> experiment with as an extension), but another approach I had thought
> >> of (for dealing with FIR type menus and headers) was to suggest an
> >> addition to stdWrap such as ".headerCSS" (or maybe a stdWrap hook
> >> for the existing "page.CSS_inlineStyle") which could be used to add
> >> css into a <style> block in the head of the page; then
> >> config.inlineStyle2TempFile = 1 would take care of removing the
> >> styles to a separate stylesheet.
> >
> > ok, the problem would be that when a new menuitem is added that a new
> > stylesheet has to be written, further - for the headers - on every
> > page new stylesheets have to be written. so every single page must
> > have its own stylesheet anyway...
>
> ??? - any reason for this "own" stylesheet for each page?
> AFAIK all the graphics for the GMENU are just created once and then this
> image file is used for all pages containing this item.
> If there is an additional item this is created once too so you only have to
> "edit" the existing stylesheet and use it on every page with includeCSS.
> If you include something like a "version counter" into the file name you can
> even get rid of caching problems.
>
> Just my 0,02?
>
Yeah, this was what I meant. The idea is that you get the ability to
do something like this (much simplified):
lib.nav = HMENU
lib.nav.1 = TMENU
lib.nav.1 {
NO {
...
...
### Using my fake stdWrap item:
stdWrap.includeCSS {
5 = COA
5 {
### Wrap each item with something unique to hang styles on:
stdWrap.dataWrap = #nav{page:uid} background:url(|);
### Return an IMG_RESOURCE
5 = IMG_RESOURCE
5 {
...
...
}
}
}
}
}
Stefan:
The only link that's really missing for a TS method is a way to get
styles into the head of the document; the CONFIG object already
provides a way to move styles from the head of the document into an
external stylesheet that will be cached by the browsers.
Also, for headers, a redefined version of lib.stdHeader like I did is
really simple to port into an extension. It has the advantage (if it
can be used at all), or being about 99% configurable without touching
any php logic.
JoH:
Thanks for the CSS tip; I definitely didn't intend those headers to be
taken as models for the CSS in replaced headers. It was just the TS.
It's a while now since I built them, but as I recall, I successfully
implemented 'align' as well as h1 - hx...can't remember if I went as
far as building subheaders too or not.
Tapio:
What on earth does what you're talking about have to do with the
subject of this thread? (Please! Don't answer...)
All:
Does anyone think that such an addition to stdWrap would be valuable
enough to add to bugtracker as a feature request?
-Christopher
More information about the TYPO3-dev
mailing list