[Typo3-dev] GTMENU
Christopher
bedlamhotel at gmail.com
Wed Sep 7 00:12:12 CEST 2005
Hi Stefan,
On 06/09/05, Stefan Beylen <intsys at swissinfo.org> wrote:
> Hello list,
>
> I like to publish the code that I wrote to generate a menu like you can
> see here: http://www.sbmp.at/?1
> Looks like a usual GMENU but isnt...disable the styles an you will see
> that its actually a TMENU...nice for searchengines I guess...
>
> at the moment its a usual GMENU with an IProcFunc that renders the
> styles and returns the links, nothing big.
> Anyway, I promised that I will make an EXT so everyone without
> programming skills can use it.
>
> My original idea was it to add a new menutype called GTMENU (graphical
> text menu) which does the same (and has the same options as GMENU) but
> renders the graphics as styles as my IProc does...but I got no clue how
> to extend Typoscript...
>
> So my questions are: anyone an idea what the best way is to realize that
> extension? I want it as easy as possible for the user to install it, and
> imho the easiest would be to add a T between G and MENU...
>
> thx for helping!
>
> p.s.: as you can also see the headlines are also rendered as
> styles...with a preUserFunc...that would be next on the list to implement...
Nice work. I'm impressed :-)
A couple of comments:
GTMENU or "stdWrap.headerCSS"?
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.
This approach could be used to let any TS object add its own styles
dynamically to a page/site - though it occurs to me that it might be
better to make it even more general and just allow it to place any old
thing in the head of the page (javascripts, meta tags, css...). Does
this a) make sense to anyone else or b) have serious problems that I
haven't considered? (either in use or implementation...)
Secondly, with respect to your headlines, I've done _almost_ the same
thing in pure TS. Look at the (ugly) orange headlines at
http://www.bedlamhost.com/ - I've just redefined lib.stdHeader in my
main template to achieve this.
Again, your solution is superior in that it places css in the head of
the document instead of using inline styles, but I think that using TS
is a fruitful avenue to explore for this kind of stuff.
-Christopher
More information about the TYPO3-dev
mailing list