school_guy
school_guy

Reputation: 300

Typo3 Blog with Subtemplate

I am trying to set up the following structure:

Landing-Page (Root-Template)
--- Content Webpage 1
--- Content Webpage 2
------ Other Sub stuff
--- Blog (Blog-Template)
------ Blog stuff (apply Blog-Template)
--- 404, etc.

My problem with this is that if I am applying the blog template to my blog root, then my template is applied to all sites at the same level (so: Content Webpage 1 & 2, ...).

How can I prevent this and only assign my blog template to this site and lower?

P.S.: I am a beginner, so a bit of background would be nice if this is possible. I read a few of the Tutorials on docs.typo3.org, but that did not help...

Upvotes: 1

Views: 104

Answers (2)

school_guy
school_guy

Reputation: 300

Okay, I finally got it to work like I desired.

Because the Blog-Template is a static Template I just assigend it to the main Template. Important was the order of the static Template includes.

  1. Fluid styled content
  2. Bootstrap package
  3. Typo3 Blog
  4. Typo3 Blog Template

The reason for that is that the Typo3 Blog Template needs the Fluid styled content and because my Fluid styled content include was the last one before, Typo3 threw me an error that it was not able to find some fluid elements.

Upvotes: 1

David
David

Reputation: 6084

You an create a template-record on the page Blog, then only that page and subpages get that configuration. Else the default configuration is taken which is or has to be defined in the root-template.
You also could use Conditions in the root-template to check for the Blog-Page and assign the special template inside that condition. Assumed your Blog has the pid (Page-Id) 5 the condition would look like this:

... (other stuff before)

[PIDinRootline = 5]
    here you special template configuration
[global]

... (other stuff afterwards)

There is another option but there you need already advanced knowledge, as it's not explained too deep in my answer there (the TCA-part is missing): how to add multiple fluid-templates.

Upvotes: 1

Related Questions