[TYPO3] what is a template? template or template or template
Bernd Wilke
xoonsji02 at sneakemail.com
Sat Jul 22 00:51:45 CEST 2006
On Sat, 22 Jul 2006 12:31:24 -0400, Amir M. wrote
with subject "Re: [TYPO3] Sub-Templates?":
> Bernd Wilke wrote:
> > On Sat, 22 Jul 2006 03:14:41 -0400, Amir M. wrote
> > with subject "Re: [TYPO3] Sub-Templates?":
> >
> >
> >>The problem with your suggestion, Erik, is that if I had to change
> >>something to the general CSS style, I would have to go through every CSS
> >>copy to make the changes.. which may be a hassle - no? However, other
> >>then that concern, this does seem a bit more easy then the other
> >>alternatives.
> >>
> >>Bernd and Christopher, I am a little confused at your approaches. Do I
> >>place that TS code in my current master template? Do I have to do
> >>anything to my TemplaVoila settings, or the Data Structure or anything
> >>like that? As Erik said, my banner is only defined in the CSS and the
> >>.html file. I assume I would have to address it with TV, or no?
> >
> >
> > I haven't used TV yet. I'm one of these geek, who know every bit by heart
> > ;-)
> >
> > I use a HTML-Template as it is created by TV (as far as I know), but coded
> > it by hand. something like this:
> >
> > <html>
> > <head
> > :
> > </head>
> > <body>
> > <!--###DOCUMENT### begin -->
> > <div class="header">
> > <div class="logo">###LOGO###</div>
> > <div class="mmenu">###MMENU###</div>
> > </div>
> > <div class="middle">
> > <div class="submenu">###SUBMENU</div>
> > <div class="content">###CONTENT</div>
> > </div>
> > <div class="footer>###FOOTER###</div>
> > <!--###DOCUMENT### end -->
> > </body>
> > </html>
> >
> >
> > watch the Marker ###LOGO###. this is the part I reffered in the code of my
> > first post.
> > The code from that post is typoscript, you have to write in your template.
> > in your mastertemplate and (case 1) in extension-templates
> >
> > If you have done it like this:
> > <div class="header">...</div>
> > with
> > .header { background-image:url(myimage.jpg); }
> > you have no chance to replace the image with typo, except you use different
> > CSS-files.
> >
> > Bernd
> >
>
> So are you saying maybe I should edit the .html template, and instead of
> using CSS for the header, maybe replace <div class="header">...</div>
> with ###LOGO###? Then address ###LOGO### in the subtemplates as Ryan
> Off has suggested?
I try to catch up with you.
As far as I can identify your problem, you have to do this:
* remove your background-image-definition in the CSS
* insert the image in your HTML
* use TV to replace this image with a marker
or:
* insert the marker by hand
my advice: keep the wrap '<div class="header">|</div>'
after that you have the choice to replace this marker with one of the
methods Ryan or I offered you.
Bernd
-----
just for clarification some information, as I know:
html-template
= a html-file with markers or subparts, which you can work on
or replace by typoscript (or php in an extension) [*1*]
template
= a record of typo3, which consists of typoscript-definitions (and
typoscript-meta-information) [*2*]
TEMPLATE
= a Typo3-Content-Object (cObject) (->TSRef 8.0.26) [*3*]
http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/8/26/
TV takes a plain, valid HTML-file with normal content and identifies some
parts of it and replaces them with markern/subparts, which can be filled
with typo3-content-elments.
If you skip TV and do it by hand the replacement normaly is done with some
typoscript like this:
page.10 = TEMPLATE [*3*]
page.10 {
template = FILE
template.file= fileadmin/template/default.html [*1*]
workOnSubpart = DOCUMENT_BODY
marks.MARKER1 = COA/IMAGE/TEXT/...
marks.MARKER2 = COA/IMAGE/TEXT/...
subparts.SMARKER1 = COA/IMAGE/TEXT/...
subparts.SMARKER2 = COA/IMAGE/TEXT/...
}
this is included in a typo3-record [*2*] which shows up as:
Title: temp.mainmenu
Sitetitle:
Description:
Resources:
Constants: (edit to view, xx lines)
Setup: (edit to view, yy lines)
Click here to edit whole template record
or editing the whole record:
Template title:
[ ]
Website title:
[ ]
Constants:
[ ]
[ ]
Setup:
[ ]
[ ]
Resources:
[ ][A]
[ ][V]
Clear:
[ ] Constants [ ] Setup
Rootlevel:
[ ]
Include static:
Selected: Items:
[ ][A] [ ][A]
[ ][V] [ ][V]
Include static (from extensions):
Selected: Items:
[ ][A] [ ][A]
[ ][V] [ ][V]
Include basis template:
[ ][A]
[ ][V]
Static template files from T3 Extensions:
[ ][V]
Template on next level:
[ ][A]
[ ][V]
Description:
[ ]
[ ]
Backend Editor Configuration:
[ ]
[ ]
Maybe some TV-user can help us to become a common base.
--
----------------
Bernd Wilke
Annweilerstr.20
40229 Düsseldorf
0211/229 2800
More information about the TYPO3-english
mailing list