Wednesday, December 4, 2013

Day 14: Day 2 of (almost) nothing works

The log entry for Day 13 has been excised, since nothing worked yesterday when I tried to follow the "Praxiswissenschaft" tutorial for setting up editor permissions. The editors I set up can login to the backend and see the various modules I've allowed them to, but no pages. NO pages. Just an empty page-tree. I spent most of the day going over the tutorial again and again, without success. After a Git tutorial, I gave up on the permissions and moved on the preview the chapter on TemplaVoila, which is what I'm implementing today. I felt so unproductive yesterday that I went home early and did a Code School class at home on new features in HTML5 and CSS3. It was easy and fun, finally, as we say in German, an "Erfolgserlebniss".

Today I'm setting up my Typo3 site to work with TemplaVoila. I find it so complicated that I wonder how I will procede without the explicit instructions from the book. Also - guess what - it doesn't work. Where I'm supposed to see a site like the one I built, with no content, I just see a light blue page. Inside the body tags there is nothing. I wonder if I picked the wrong div tag at the beginning of the tutorial? The screenshot in the book showed three and I only had two: I picked the top one.

Two good things today, in any case, include getting to look at the models for someone else's project, and got to help someone with a mail problem in PHP (Erfolgserlebniss).

Going back to the beginning of the tutorial, I recheck my first selected <div> tag - the ID matches. In the preview within the "TemplaVoila" module, everything looks the way it should. WTF doesn't it work on the frontend, then?

Post-lunch: I found the problem in my TypoScript for the Template for the root page of the TemplaVoila site. I had a typo, namely an "l" where a "1" should have been:

page = PAGE
page {
  includeCSS.style = fileadmin/css/style.css
  config.doctype = xhtml_trans
  10 = USER

#false!
#10.userFunct = tx_templavoila_pil->main_page

#correct!!
  10.userFunc = tx_templavoila_pi1->main_page
}

Now the preview looks great. What a relief. Trying to do the same thing as demonstrated in "Praxiswissenschaft" for the left-hand menu, but for the breadcrumb-menu and time-dependent greeting, I went through the following steps. Note - this did not lead to success.

1) Under "Web", click on "TemplaVoila"
2) Click on the link to the saved Template Map under "Storage Folder"
3) Click on "Update Mapping" and then "Modify DS/TO" (Datastructure / Template Object); in the popup, click "OK"
4) In the "Enter a field name" input, enter (for the time-dependent greeting "field_greeting" and for the breadcrumb-menu "field_menu_breadcrumb")
5) Select "Element" from the dropdown, enter the title "Greeting" (or "Clickpath"), and for "Element Preset" the type "Typoscript Object Path".  Click "Add".
6) Now click "Map". Choose the div tag with the id "meta". It should be of type "INNER" (replacing only the content between the div tags, not the div tags themselves). Click "SET" and then "SAVE".

Now the Typoscript element "lib.field_greeting" and "lib.field_menu_breadcrumb" are available for coniguration with TypoScript in the Template for the TemplaVoila rootpage. I coded it assuming that I could use the same TypoScript I used in the template for the main (non TemplaVoila) root site. This, however, did not work. It didn't BREAK anything, but it didn't render anything, either, except for the "greeting" text:

#create breadcrumb menu
lib.field_greeting = TEXT
lib.field_greeting {
  value = You are here:&nbsp;
  lang.de = Sie sind hier:&nbsp;
}

lib.field_menu_breadcrumb = HMENU
lib.field_menu_breadcrumb {
  special = rootline
  special.range = 2|-1
         
  1 = TMENU
  1 {
    NO = 1
    NO.linkWrap = |&nbsp;&raquo;&nbsp; |*| |
  }
}

Because there is currently no internet access for me to be able to google at this time, I'm going to move on to "Zukunftsichere Typo3-Extensions mit Extbase und Fluid" ("Reliable Typo3 extensions with Extbase and Fluid"), by @Jochen Rau and @Sebastian Kurf├╝rst. I ordered the second edition for my Kindle, but it looks like it went and gave me the first, from 2010. One of the first problems is that the book is unaware of the existence of Typo3 v6. I am annoyed. Life at sea Learning programming can be so inconvenient sometimes most of the time.

No comments:

Post a Comment

Play nicely!