[Typo3] Inherited/Overridable Content?

Charles Rector crector at iexposure.com
Thu Apr 28 17:09:00 CEST 2005


Is there an easy way to inherit content elements in the same way 
templates are inherited, so that they can be shared for all sub-pages, 
but also overriden when needed?

I have some contact information in the right column which I want to use 
for all sub-pages at a specific starting point. However, I also want to 
be able to quickly override this contact information in specialized 
cases where the contact information is different.

I can sort of achieve this by using the "HTML/CSS styling" extension and 
making these pages all use shared content, but doing so is a little more 
involved than I'd like. I have to go to the Constants Editor at the 
starting point, modify the shared content pid to point to the pid of my 
page with the shared right column content, and then for each 
special-case page I have to do the same thing, but set the starting 
point pid to 9999 so that it's effectively disabled. At that point I can 
just enter the special case contact information as a normal right column 
content element.

This works because my setup is something like so in my template HTML:

	<div id="rightcontentshared">
		...
	</div>
	<div id="rightcolumn">
		...
	</div>

When the shared content is disabled, the page-specific right column 
content shows up where the shared right column content would've been 
since that element becomes empty.

This all seems rather kludgy to me, however.

Putting the contact information in the template itself is not an option, 
because I still want the contact information to be quickly and easily 
modifiable by TYPO3 users.

Also, using the shared content in this way makes it to where any other 
shared elements I define in the shared content page for the left column, 
body, etc. are also disabled, and not just the right column.

Has anyone else faced this sort of complication? And if so, what was 
your solution?

Any ideas appreciated!



More information about the TYPO3-english mailing list