0
votes

I'm building a site with Fluid Template. I have created two different front-end layouts and two different back-end layout but I always get this error #1288085266: No template has been specified. Use either setTemplateSource() or setTemplatePathAndFilename(). Accordingly to Typo3 Wiki this should be a solution Exception/CMS/1288085266

but not in my case. This is my code:

config.doctype = html5

page = PAGE
page {
	includeCSSLibs.bootstrap = https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css
	includeCSS.style = fileadmin/templates/rka2015/css/style.css
	
	includeJSlibs.jquery = https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
	includeJSlibs.bootstrap = https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js
	includeJS.custom = fileadmin/templates/rka2015/js/custom.js
}
	
page.10 = FLUIDTEMPLATE
page.10 {
		
		file = fileadmin/templates/rka2015/layouts/main_layout.html
		layoutRootPath = fileadmin/templates/rka2015/layouts/
		patialRootPath = fileadmin/templates/rka2015/partials/
		
		variables {
			siteName = TEXT
			siteName.value = rka2015
			
			contentMain < styles.content.get
			contentMain.select.where = colPos = 0
			
			content_column_1 < styles.content.get
			content_column_1.select.where = colPos = 1
			
			content_column_2 < styles.content.get
			content_column_2.select.where = colPos = 2
	}		
}


page.10.file.stdWrap.cObject = CASE
page.10.file.stdWrap.cObject 
	{
    key.data = levelfield:-1, backend_layout_next_level, slide
    key.override.field = backend_layout
    
    default = TEXT
    default.value = fileadmin/templates/rka2015/main_1_column.html
    1 = TEXT
    1.value = fileadmin/templates/rka2015/main_1_column.html
    2 = TEXT
    2.value = fileadmin/templates/rka2015/main_2_column.html
}

I have already checked all; section name is OK, ID for back-end layouts are ok, template is defined, everything seem to be as it should be. I really don't have a clue where else to search.

UPDATE!!!

Seems like there is a problem with a file path. I am running my site on a subdomain and it looks like that ts doesn't find the file paths if they are defined only as fileadmin/... Any thoughts? Thanks

SOLUTION!

page {
	includeCSSLibs.bootstrap = https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css
	includeCSS.style = fileadmin/templates/rka2015/css/style.css
	
	includeJSlibs.jquery = https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
	includeJSlibs.jquery.external = 1
	includeJSlibs.bootstrap = https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js
	includeJS.custom = fileadmin/templates/rka2015/js/custom.js
}

page.10 = FLUIDTEMPLATE
page.10 {
    template = CASE
    template {
      key.data = levelfield:-1,backend_layout_next_level,slide
      key.override.field = backend_layout

      1 = FILE
      1.file = fileadmin/templates/rka2015/main_1_column.html

      2 = FILE
      2.file = fileadmin/templates/rka2015/main_2_column.html
    }
    partialRootPath = fileadmin/templates/rka2015/partials/
    layoutRootPath = fileadmin/templates/rka2015/layouts/
    variables {
	
			siteName = TEXT
			siteName.value = rka2015
			
			contentMain < styles.content.get
			contentMain.select.where = colPos = 0
			
			content_column_1 < styles.content.get
			content_column_1.select.where = colPos = 1
			
			content_column_2 < styles.content.get
			content_column_2.select.where = colPos = 2
  }
}
2
Is file = fileadmin/templates/rka2015/layouts/main_layout.html correct? Isn't maybe file = fileadmin/templates/rka2015/main_layout.html or file = fileadmin/templates/rka2015/templates/main_layout.html or something correct?Jost
Hi Jost, thanks. Paths are correct, I've checked them.ABoooo

2 Answers

0
votes

First, check out if TYPO3 can read the file by overwriting the page object by appending this to the end of your template:

page.10 >
page.10 = FILE
page.10.file = fileadmin/templates/rka2015/layouts/main_layout.html

If that doesn't generate a page with the raw, uninterpreted output of your template file, then theres something wrong with either the file path or file permissions.

Secondly, in Fluid, Templates and Layouts are different things with different uses and should propably not be put into the same directory.

Most importantly, theres something wrong with the backend layout switch you're trying to build with the CASE in page.10.file.stdWrap.cObject . You see, the stdWrap object actually wraps around the text you've already set. If stdWrap cant find a pipe to figure out how to wrap, it just appends instead. Remove the line where you set the file in the top part and only leave the stdWrap case and you should be good to go.

0
votes

at the first look it looks right... but check your file paths, maybe they are wrong as "Jost" commented.

i'm not sure but i think the problem is that the template path (file = ...) is the same as layout root path...

by the way... if you include external styles and javascripts you need to set something like the follows i think...

includeJSlibs.jquery = https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
includeJSlibs.jquery.external = 1