[Typo3-dev] Shared contents and several content area templates with TemplaVoila?
tapio
tapio.markula at dnainternet.net
Sun Jun 19 10:54:38 CEST 2005
>>Proper solution for shared content - all you proposals were bad!
> This is semi-ridiculous. How did you do it using 'mtb'?
1) I installed zed_more_columns I modified it to support needed columns
(I added to it multilanguage support by adding 'locallang_db.php' for
'ext_tables.php').
2) I added 'pidSharedContent = 9999' to contans.txt for CSS Styled
Contents in order to get it support an extra contstant
3) I added following to setup.txt for CSS Styled Contents (I defined
altogether ten columns - below is as example just two)
...
# get content, header
styles.content.getHeader < styles.content.get
styles.content.getHeader.select.where = colPos=4
# get content, footer
styles.content.getFooter < styles.content.get
styles.content.getFooter.select.where = colPos=5
...
###########################################################
# Initialise the Shared Content - start
###########################################################
styles.content.getShared < styles.content.get
styles.content.getShared.select {
pidInList = {$pidSharedContent}
}
...
styles.content.getHeaderShared < styles.content.getHeader
styles.content.getHeaderShared.select {
pidInList = {$pidSharedContent}
}
styles.content.getFooterShared < styles.content.getFooter
styles.content.getFooterShared.select {
pidInList = {$pidSharedContent}
}
Shared footer, header and border are in the MAIN table.
Shared left, right and normal are in content area tables.
All shared contents comes from ONE page - easy to update shared contents.
> did it, you can probably do it almost the same way. Incidentally, my
> solutions 2 AND 4 should both be workable even if you don't know the
> uids of the content elements. Read over the documentation for 'select'
> in the TSref [1].
> There is an annotated solution on that page that's based on colpos,
> but is otherwise almost what you are asking for. It should be simple
> enough to alter so that the CONTENT object selects all objects on a
> single page; you just create a single page for 'global' content
> elements
the selection should be base on colpos - each shared content gets
contents from ONE column - using several pages in this purpose is not
handy even if I would write 'Shared contents for Left' etc.
> [For the sake of this example, I assume the page layout has three
> visible columns:
>
> a) menu
> b) content
> c) 'shared content',
> ...and that you would like to have two different sets of shared
> content available]
Well shared contens almost foll all content areas.
> 1. Create a FCE with FOUR columns in the DS
> 2. Put a TS object in column (a) for the menu
i did corresponding content areas for a template
> 3. Set up column (b) so that it can contain content elements
I did corresponding content area for a template
> 4. Call a TS object from each of the remaining two columns, but
> provide a different value for the page id in the select function
fixed page id here seems reasonable
> 5. Create a TO that only includes columns (a), (b), and (c)
> 6. Create a TO that only includes columns (a), (b), and (d)
Do you mean raelly TO and not DS?
I did two different DS, which other has one content and the another
three content areas.
I made for the same DS two TO, but for the other I didn't mapped all
content area fields.
DS reveled however for the user all three content areas.
One DS with two TO didn't work in this soluton.
I must made another DS in order to get visible just one content area.
I made for that new T0.
> By basing these two FCEs on the same TO
or do you mean DS?
>, your main content will be
> unaffected if you switch the from one FCE to the other. At the same
> time, your 'shared content' column will change when you switch the
> FCE.
in general shared content should be always visible but in some case it
is reasonable to swich selecting alternative DS/TO.
> content elements is too difficult for end users.
maybe - I must compare TV and MTB primary at the sight of end users
More information about the TYPO3-dev
mailing list