[TYPO3] Custom Menu/Sitemap?

Niels Fröhling niels.froehling at adsignum.com
Tue May 29 02:29:27 CEST 2007


 Hy Joey;

 >>  But what do you mean by: "It's just a TypoScript element that will
 >> render HTML elements on a per page basis"? There is no TypoScript
 >> 'content-element' in that I can sink a HMENU.
 >
 > Of course there is, you just don't know how to do it :-)
 >

 Right. :-)

 >>> Your problem seems to be to get the output of the HMENU in front of
 >>> the rest of your content but that's easy as soon as you are able to
 >>> tell me the answer for question 2 :-)
 >>>
 >>  Well, it's not about in-front-of, I could hack the specific HMENU
 >> everywhere, but just in a fixed way.
 >
 > No, because an HMENU like that
 >
 > temp.blah = HMENU
 > temp.blah {
 >     special = updated
 >     special {
 >         value = 1
 >         depth = 20
 >         limit = 1
 >     }
 > }
 >
 > would never be "fixed" but always show one page that has been the 
last one
 > being updated.

 No, I mean 'fixed' for the position, _if_ I would go through templates 
and submarkers.

 > So this is already dynamic, now you just have to find a way to put 
this into
 > a content element.
 > And I agree it would be best to use "menu/sitemap" for that.
 >
 >> And it's dirty. This 'menu/sitemap' I want is a 'page-content' with
 >> all it's advantages, it just has to look
 >> different.
 >
 > So let's just do it ;-)
 >

 Thanks, my ears, well eyes, are wide open ...

 > First you need to create a new option for the selectbox of this 
element and
 > add it to the existing options, just to make sure the default 
behaviour will
 > not be overriden.
 > This can be done with TSconfig, so go to the first (root) page in 
your tree
 > (but not the one with the globe icon) and edit the page header.
 > Now fill this into the TSconfig field:
 >
 > TCEFORM.tt_content.menu_type {
 >     addItems {
 >         99 = Last updated page with abstract and image
 >     }
 > }

 This is a quantum-jump for me, I didn't know that /that/ is a 
possability, and it's even the very best one.

 >
 > Now your editors can select this new entry but there's no TS setup for it
 > yet.
 > So let's do that now.
 > Go to the TypoScript template that is responsible for the content 
rendering.
 > ...
 > And now this has to be put into the right place of the tt_content setup.
 > Therefor you can use the TypoScript Object browser to see what is already
 > there and where to place it.
 >
 > You will find something like this:
 >
 > tt_content.menu.20 = CASE
 > tt_content.menu.20.key.field = menu_type
 >
 > This means the menu is rendered based on the settings in the "menu_type"
 > selectbox of the content element "menu/sitemap".
 > Since we already added a new element 99 we now have to add this here too:
 >
 > tt_content.menu.20.99 < temp.lastUpdated

 Gorgeous! As I allready had my LastUpdated-HMENU prepared, this was 
extremely
easy!

 > Done!
 > Have fun with this small tutorial and hopefully this will enlighten you
 > about
 > a) How things can be solved in TYPO3 and
 > b) Which documents to read in the near future
 > 
http://typo3.org/documentation/document-library/references/doc_core_tsconfig/current/
 > 
http://typo3.org/documentation/document-library/references/doc_core_tsref/current/
 > 
http://typo3.org/documentation/document-library/core-documentation/doc_core_tsbyex/current/

 Well, the last time I just drink coffee and eat Typo3-documentation, 
it's just so crypted if
there is no document that describes the _idea_, of how T3 works. I 
actually do not have
any problem to implement things the moment I understood the idea. Some 
of the solutions
for common problems are soo scattered all over the T3-system that it's 
really hard to fit the
seperate pieces together.
 My first problem (some weeks ago) was detecting how to customize 
css_styled_content
output (and I'd read the Typo3-book), I was walking walls, untill I 
found 'wrap', and then
everything was just wrapped, everywhere, and I could do it.
 You just have to know so much, to identify the important information, 
to make so little.

 > Joey

 I thank you a lot for taking your time exlaining me this
    Niels




More information about the TYPO3-english mailing list