REVIEW
PACKT Publishing asked me to review their new TYPO3 Templates book. The book arrived on 2010-12-28 and I'm reading chapter by chapter and write my review for each one with a screenshot.
Summary (2011-03-10):
After reading 7 of the 11 chapters I can tell you that this book is really worth it. Worth the money and worth the time you spend on each chapter.
In about 300 pages you learn howto create and modify TYPO3 templates using the TemplaVoila extension. Even if you don't use (or like) TemplaVoila, you get lots of input for your work. Sometimes small things like howto create a breadcrumb menu, howto make graphical menus with your favorite font and howto make a mobile or printable version of your website.
I like the writing of Jeremy Greenawalt. It makes fun reading because you can imagine the small story around the main theme: Show your boss how cool is TYPO3 and your created templates.
But it's not only funny. Greenawalt knows TYPO3 from the beginning and he knows where may occure problems and conflicts e.g. with you and the editors. And he analyzed his experience and teaches you in a very good structured manner. First he is going into deep and in the next chapter there is only a little repetition. But this is enough to get further very quickly and to keep the learnd things.
The amount of screenshots (with TYPO3 always a problem) is high but not too much. You need a lot screenshots in TYPO3 to understand what is happening. Greenawalt made as much as necessary - but no more.
I like this book very much even though I knew template creation in TYPO3 already. But you never stop learning with this huge CMS. Big recommondation!
The first chapter makes a lot fun to read. You really can follow the steps the author Jeremy Greenawalt describes. Frist you create a very basic template, install TemplaVoila and you connect these two. The idea behind this concept is described very good. You really notice that the author knows TYPO3 from the beginning.
To play with the examples, I just setup a demo TYPO3 installation at templavoila.bigga.de - you may follow my progress there!
The screenshots are very good made and really helpful. You need screenshots or videos to understand the workflow in TYPO3. Otherwise it takes too long to learn. In screenshots markers show you the option or action you have to select. That's really good - otherwise you get lost.
At the end of the chapter, I have an ugly page with default content, a menu and a submenu connected to a very basic template. Great!
In chapter 2 the author analizes the four TYPO3 ways to include the CSS files to the document header. Each possibility is described with its advantages and disadvantages.
At the end of this chapter you understand Jeremy prefered way to write the CSS link by hand using the Page.headerData function. Now the page looks much better.
On about 20 pages the author guides you through adding a custom banner, an self-updating timestamp and a dynamic logo / exchangeable logo image.
It's always the same procedure and you get it explained with very good screenshots and a funny but exact description of what to do. In every step it's getting less descriptive because you know the steps with TemplaVoila already.
At the end, you have a logo on top which you can replace by TypoScript, a timestamp which you can configure with TypoScript and a banner which you can exchange in the "Edit Page" context.
A lot of progress in only 20 pages!
You learn in this chapter the HMENU object which generates hierarchical menus. First you do this with text menus (TMENU) than you swith to graphical menus using GMENU.
Because menus are very import for the user acceptance of your site, the book spends quite a lot pages for this subject. This is done very good as in the chapters before every step is based on its predecessor.
Here I learned howto make a breadcrumb menu (it's so easy!) and howto use my favorite TTF-font with GIFBUILDER to dynamically create menu items - even with rotated text. Great. The result, you see on the screenshot on the right.
In Chapter 5 you start using multiple templates with your installation. You learn howto create a template for different sidebars (left, right, left and right). For the editors using your templates, you add icons to make the selection easier.
After this step, the author introduces the extension templates, I'm using a lot. As example you add a different logo and view on the products site.
At the end you create a printable template and add a link to toggle between these two views.
As in the other chapters it makes fun reading the simple story around the common thread.
If you really follow this chapter, you have to type a lot. But the author points out that all sources may be optained from the packtpub website: https://www.packtpub.com/support/. You have to enter your email there and you receive a link to the sources of the whole book.
Why do we hack a template by scratch? It's to show you howto survive without the TemplaVoila wizard. Even when the wizard can't help you.
As example, we create a new template for a newsletter and create a sample one. It's fast done and nevertheless interesting. But this is only a step before chapter 7 which goes much deeper.
Rather interesting part in this chapter is the configuration of the RTE (Rich Text Editor) in the TYPO3 backend. I didn't like the htmlarea RTE in the past because it is/was so slow. But for the review I used it and modified it following chapter 7.
At one point I was looking for more than one hour for an solution because Jeremy Greenawalt missed a point in his example. It's not a "we can add" but a "we have to add" the RTE.default.proc.allowedClasses to our page TypoScript. Otherwise the changed color won't be saved to the database and is lost.
Second point in this chapter is the backend layout of the newsletter and the columns view for the editors. I've done very quickly a backend layout for the newsletter following the steps in the book. I haven't modified the backend layout yet. Interesting.
At the end, the author describes the new handling of the data structures as of TemplaVoila 1.4.2. I haven't tried it yet. It sounds interessting but also very, very beta and confusing.
I really like perfectlightbox by Benjamin Niediek and I'm using the current tt_news extension version 3.0.1 in several installations.
In one of those sites with tt_news a customer pointed out a problem with the image titles in lightbox view. This only happens if you have several images. The title in lightbox view of every image keeps always the title of the first image.
This is really a tiny and anoying bug. That's why I tried to fix it and hopefully found a solution.
How it works:
Perfectlightbox used to overwrite the tt_news function imageMarkerFunc by its own one in the static/setup.txt:
### If dam_ttnews is also loaded do not include the imageMarkerFunc
[globalString = TYPO3_LOADED_EXT|tt_news|type=L] AND [globalString = TYPO3_LOADED_EXT|dam_ttnews|type=L]
## Do nothing
[else]
plugin.tt_news.imageMarkerFunc = tx_perfectlightbox->ttnewsImageMarkerFunc
[global]
But after several modifications in tt_news to enable OptionSplits (starting with 3.0.0?), the old function didn't work anymore. So, Ben decided to comment this overloading in perfectlightbox. Unfortunately this led to the problem described above.
I took now the tt_news imageMarkerFunc() and copied most of the OptionSplit-work into the ttnewsImageMarkerFunc of perfectlightbox. This seems to fix the problem not only in tt_news SINGLE-view but also in SINGLE2-view (using OptionsSplit).
With the following Typoscript I tested my patch with tt_news and OptionSplit in SINGLE2-view:
plugin.tt_news {
archiveTitleCObject {
10.strftime = %B - %Y
}
getRelatedCObject {
20.strftime = %d.%m.%Y %H:%M
}
displaySingle {
# configures tt_news to use 3 image markers. The first
# image is rendered to marker 1, the last 2 images
# are renderd to marker 3, the rest will go to marker 2.
imageMarkerOptionSplit = 1|*|2|*|3||3
image.file.maxW = 200|*|90|*|100||100
image.file.maxH = 200
# this configures tt_news to wrap only each "middle" (marker2) image
# with <div class="sv-img-small"> (div is closed later)
image.wrap = | |*|<div class="sv-img-small">|*| | || |
# This wraps all images in the first image marker to
# <div class="sv-img-big">|</div>.
# marker 2 and 3 will be wrapped to
# <div class="sv-img-small-wrapper">|</div>
imageWrapIfAny (
<div class="sv-img-big">|</div>|*|
<div class="sv-img-small-wrapper">|</div>
)
caption_stdWrap.required = 0
# This wraps the image caption in a <p> tag. have a look at
# the "middle" wrap which closes the div from above to surround
# the image and its caption
caption_stdWrap.dataWrap (
<p class="news-single-imgcaption">|</p>|*|
<p class="news-single-imgcaption">| </p></div>|*|
<p class="news-single-imgcaption">| </p>||
<p class="news-single-imgcaption">| </p>
)
}
}
Yesterday, I sent my patch to Ben and I hope he won't find any new bugs. Then it might be in the next perfectlightbox bugfix release soon.
I'm using currently TYPO3 4.4.4 and tt_news 3.0.1. The last tt_news version is almost one year old now (its from 2009-12-02) and there are plenty of open, unassigned bugs. It seems to me that nobody is working on tt_news at the moment. But a lot of people are using it.
One of my customer asked me, why it is not possible to see the articles as preview in the backend. tt_news just tells you in SINGLE view: "no news_id given". Ok, I'm using realurl. But even when switching it off, tt_news still claims "Keine news_id übergeben." (German translation).
I found a bug report (15600) and a dirty hack for this issue. I changed this hack for my needs and it's working now for me. Of course it will get lost with the next update of tt_news but nobody knows when it will be updated :-(
// http://bugs.typo3.org/view.php?id=15600
if( is_object($GLOBALS['BE_USER'])){
$suchmuster = '/AND \(?tt_news.hidden\=0\)?/';
$this->enableFields = preg_replace($suchmuster, "", $this->getEnableFields('tt_news'));
} else {
$this->enableFields = $this->getEnableFields('tt_news');
}
I've just upgraded my fit-PC2 from Ubuntu 10.04 to 10.10 and it is still running fine with the poulsbo driver!
The update process did most of the part automatically. I had to remove manually the driver xserver-xorg-video-nouveau which was installed before the update could be run. Don't ask me why...
After upgrading it is very important to reactivate the psb driver repository by hand in /etc/apt/sources.list.d/gma500-ppa-lucid.list
deb http://ppa.launchpad.net/gma500/ppa/ubuntu maverick main # Bei Aktualisierung zu maverick deaktiviert
Otherwise the psb driver gets lost and your xserver won't work. Don't forget to do by hand a
sudo apt-get update; sudo apt-get upgrade
After a reboot this was nevertheless the case but happily the console was working. The reason for this failure was the xorg.conf which changed back to the one using intels iegd. I copied the old one to xorg.conf and now it's working again.