[TYPO3-english] Different Fluid layouts for different pages. How to implement?

Michael Albers (Concatenate) info at concatenate.nl
Wed Oct 31 00:50:48 CET 2012


Hi Andreas,

Thanks, but apparantly i can't grasp the concept of fluid.
I was thinking about doing something like this:

[globalVar = TSFE:id=2] # 2 is my home page
# Create a Fluid Template
page.10 = FLUIDTEMPLATE
page.10 {
  
  # Set the Template Pathes
  file = fileadmin/templates/layouts/home.html 
  partialRootPath = fileadmin/templates/partials/
  layoutRootPath = fileadmin/templates/layouts/
  
  variables {
    oleft < styles.content.get
    oleft.select.where = colPos = 1
    ileft < styles.content.get
    ileft.select.where = colPos = 2
    iright < styles.content.get
    iright.select.where = colPos = 3
    oright < styles.content.get
    oright.select.where = colPos = 4
  }
}
[else]
# Create a Fluid Template
page.10 = FLUIDTEMPLATE
page.10 {
  
  # Set the Template Pathes
  file = fileadmin/templates/layouts/main.html
  partialRootPath = fileadmin/templates/partials/
  layoutRootPath = fileadmin/templates/layouts/
  
  variables {
   content < styles.content.get
  }
}
[end]

Home.html is a wrapper with five rows: a header, branding, content1,
content2 and footer. Content1 should be four column
Main.html is a wrapper with three rows: a header, content and footer.
Content should be one column

But as you guess, the above setup use main.html. And the one and four column
templates (in fileadmin/templates/) point to the main and home layout
respectively.

All answers I read, seem to focus - at least that's the way it look to me -
on templates instead of layouts. That might be the way to do it, but using
layouts just seems more logical to me. But then again, I could well be an
odd fellow.

Thanks all.
Michael

-----Oorspronkelijk bericht-----
Van: typo3-english-bounces at lists.typo3.org
[mailto:typo3-english-bounces at lists.typo3.org] Namens Andreas Kiessling
Verzonden: dinsdag 30 oktober 2012 19:47
Aan: typo3-english at lists.typo3.org
Onderwerp: Re: [TYPO3-english] Different Fluid layouts for different pages.
How to implement?

Hi Michael,

Am 30.10.12 14:16, schrieb Michael Albers (Concatenate):
> Hi,
> 
> @Jigal: If I remember correctly and understand it well, setting this 
> different page means a conditional check in TS for the page id and 
> according to that setting the file. Like this:
> [globalVar = TSFE:id = 3]
> file = about.html
> [end]
> 
> Correct me if I'm wrong please.
>

Have a look here, on how to connect backend layouts with templates for the
frontend.
http://lists.typo3.org/pipermail/typo3-team-core/2012-July/052026.html

You need to adapt the setup for TEMPLATE to FLUIDTEMPLATE of course.


HTH,
Andreas
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list