[Typo3] template design question

Christopher tombedlam at yahoo.com
Wed Apr 13 17:32:42 CEST 2005


Hi,

--- Thomas Bolioli <tpblists at terranovum.com> wrote:
> I am new to typo3 and invariably with my luck, the first site I need to 
> do is a complex one designed completely by a graphic artist. Rhyme and 
> reason took a vacation on this one. <snip>


Standard warning here: Typo3 is a pretty complex system. Typically, the
best time to learn it is *not* while undertaking a large or complex
project...

 
> Is there a way to hard code (as opposed to HMENU) nav into the template 
> while preserving the ability for urls to still be constructed via typo3? 
> ie; java's c:url.


Not that I know of, but you can do anything you want by combining HMENU +
css. More on this below...


> Is there a way to "echo" back typoscript variables into the html? I want 
> to fix the changing color thing by using a variable in the page setup 
> and have it used in the construction of urls, class names, etc; I looked 
> through the ref and nothing seemed to scream out at me.


The easiest way of changing colors on a per page basis is to change the id
of the page's body tag. Then, by using contextual selectors in the css, you
can change the colours (and most other display properties) of *anything*
inside the body element *for that page only*. For example:


HTML
==========

<body id="products">
<!-- "Products" changes according to the page or section you're in; this is
pretty simple with TS, and possibly even easier with Templavoila (depends
on your requirements) -->
...
...
<ul id="navigation">
  <li>Lorem</li>
  <li>Ipsum</li>
  <li>Dolor</li>
</ul>
...
...
</body>

CSS
==========

body#products ul#navigation {
  /* Styles go here for the way the menu appears ONLY on the 'products'
page */
}

body#contactUs ul#navigation {
  /* Styles go here for the totally different way the menu appears on the
'contact us' page :) */
}


To get a better idea how much design flexibility you can have just by
applying different styling to unordered lists with identical markup, have a
look at the listamatic pages [1]. The same principles can be applied to
entire layouts - though you may want to get into this gradually :) - as you
can see at http://www.csszengarden.com.


> Is there a way to have a template within a template? I want to have a 
> template that applies site wide while then having a secondary template 
> that embed inside the main cell of the first. I looked at ext templates 
> but I am not sure what they are and how they fit in. Any pointers to 
> docs (or alternative ideas) for that would be appreciated.


Templavoila and the 'Futuristic Template Building' tutorial [2] are
probably what you need to get started with what you're describing. Using
Templavoila, any page layout you dream up should be possible as long as
it's possible in html in the first place...


-Christopher

[1] http://css.maxdesign.com.au/listamatic/
[2] http://typo3.org/documentation/document-library/doc_tut_ftb1/


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/



More information about the TYPO3-english mailing list