[Typo3-dev] ISSUE: Modern Template Building Tutorials only work with adding code modification / Declaring object property type first

Coby Pachmayr coby at _remove_ideaspring.com
Sat Jul 17 02:59:31 CEST 2004


Hi all-

I posted a rather lenghty reply and post about a problem with the Modern
Template Building (MTB) tutorial - but I thought it may have been too long
for some to read, and since that was not the only location the problem
existed (as I have now worked my way further through the tutorial) and I am
quite positive that I haven't seen the following issue addressed anywhere
yet, and I hope this is the right list.  I also know that many people could
not get the MTB tutorial to work and so gave up on a great product... I'm
glad I didn't!!  But I think either the documentation should be updated, or
a FAQ  *clearly* posted is in order.   I don't think this is a "bug"... and
my un-educated guess is it has to do with how PHP is handling the passing of
the arrays of data... the tutorials probably "used" to work.

Problem:

In the tutorials when referencing/passing/copying the values of temporary
cObjects to  cObjects for display, the tutorial code does not work as listed
in the documentation.  However, placing a line above the reference which
first declares the proper type (which seems like you SHOULD do this anyway
for consistency - even if it used to work without doing so), the code will
work.  For example:

# Example #2 ... First dynamic menu part of the tutorial

# Menu 1 Object
temp.menu_1 = HMENU
temp.menu_1 {
  # all of the code items for building temp.menu_1
  # removed to shorten this post
}

#-------- skip down to building the main template cObject for the BODY ----- 
#

# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
    # Feeding content from the Auto-parser to the TEMPLATE cObject:
    # More code removed to shorten this post
    # Now finally, the problem area

   # Subsitute the ###menu_1### subpart with the dynamic menu:
         # I have to add the line below to make the tutorial work - it is
NOT in the tutorial code
   subparts.menu_1 = TMENU
        # The line below IS in the Tutorial Code
   subparts.menu_1 < temp.menu_1
        # above line does not produce ANY (or at least expected) results
unless the line I added above is in.
        # if I comment it out, I get no output of the menu.

# ------ Rest of code omitted ----- #

# For Example #1 - find my earlier post .. not sure how to link it in this
post #






More information about the TYPO3-dev mailing list