Typo3
Typo3 and CSS: Style Your Pages based on their Alias or UID
If you look at all the pages of a particular site, you will notice that most pages share common parts. These common parts typically include navigation, header, footer, styles and so on. Of course, you can duplicate the common part in every html file on that site. But as the site grows, making a change to one of the common parts ends up in a lot of tedious work: you need to apply the change to every single HTML file on the site. Now imagine your site has 1000 pages! You don't want to do that.
Typo3: The Split Site Root Syndrome
The Problem
For months, my client's site was running fine using the above
simple solution. Over time though, I noticed several oddities. These oddities
were caused by the fact that the home page is accessible under two URLs, the
canonical root http://www.domain.com/
and
the non-canonical root http://www.domain.com/home.0.html
as
shown in the figure below.
Typo3: Including the Home Page (Site Root) in Navigation
In modern web design, it is considered good practice to have a "Back To Home" link on every page so that users can easily return to the root of the site, i.e. the home page. Because of that I wanted a Home button on every page of my client's Typo3-based website. Although this seems like a very simple thing to do, it turned out to be quite a challenge in Typo3, especially when trying to avoid duplicate content penalties induced by major search engines.
Typo3: Different CSS styles for internal and external links
It's often considered convenient to decorate external links in order to indicate the distinction between links that go to a page on the same site and links that leave the site. On one of my sites I use CSS to set a background bitmap for all links. Until today the bitmap was the same for internal as for external links. I used a little hack in order to set the class attribute of internal links to some value while leaving external links untouched.
Typo3: Using Page Alias And Other Page Record Fields in TMENU Menus
Problem: Your web site uses the Typo3 CMS. Your typoscript templates contains TMENU objects for navigation menus. You want to use the page alias somewhere in the A
tags of these TMENU menus. For example, you want to set the id of a menu item's A tag to the alias field of the page that the menu item stands for.
<a id="widgets" href="...">Buy Widgets</a>
Buy Widgets
is the title of the page and widgets
is its alias.
Typo3: To Each Their Own - Site And Page Titles In Alternative Languages
Problem 1: The Site Title Is Global
Your site supports multiple languages using the "modern" single-tree aproach where one page has one or more translations in alternative languages. In Typo3 every page's title usually starts with the site title and the page title is appended to it. The page title can easily be translated by customizing the language-specific header fields. The site title, however, can only be set globally. Consider yourself lucky if your site title is universal across languages. Mine isn't. Furthermore, I like my site's title to contain main search engine keywords, i.e. the words I want my site to be found under in Google, Yahoo and so on.