Zum Inhalt springen

mehr als 4 Inhaltsbereiche? wie?

Erstellt am 2. September 2003 · 32 Antworten · letzte Antwort am 9. Februar 2005 · Seite 1 von 2

Tags: Templates & Layouts, Frage

heikoseifert ·

gibt es eine Möglichkeit die Bereiche Links, normal, rechts und Rand umbennennen?

Diese Bezeichnungen passen auf meine Seite nicht.

und da wir gerade dabei sind, ich benötige noch einen fünften Bereich für nicht-Statische Elemente. Hat jemand eine Ahnung, wie ich diese erstellen kann?

Ich habe schon erfahren, daß ich eine extensions schreiben muß, leider bin ich da noch nicht so firm, vielleicht kann mir jemand, der es geschafft hat, mehr als 4 Contentbereiche bei sich zu erstellen kurz eine Anleitung geben. Ich würde zu diesem Thema dann auch ein Howto schreiben. Bitte helft mir.

etwas sollte folgendes helfen:
http://typo3.org/1422+M5dacda8b327.0.html
leider verstehe ich es nicht ganz.
eine solche Datei hab ich erstellt und ins ext-verzeichnis geschoben, was aber muß ich machen um diese Datei anzusprechen?

jemand anderes schrieb

Scenario:
Is there a way that the content columns in the backend can be renamed?

I want to change their name since the names "Left, Normal, Right &
Border" would not really fit to my template.

Answer:
Yes, of course. You only have to modify the TCA. What's the TCA?
Well, that's a big array containing all the information to build the backend forms for certain tables. The table's form layout you want to modify is
tt_content.

Just create a little extension with the kickstarter an then add the following lines into a file called "ext_tables.php". Save that file into your extension's directory.

t3lib_div::loadTCA("tt_content");

$TCA["tt_content"]["columns"]["colPos"]["config"]["items"] = array (
"3" => array ("Header||Überschrift||||||||","3"),
"2" => array ("Image||Bild||||||||","2"),
"1" => array ("Introduction||Einleitung||||||||","1"),
"0" => array ("Text||Text||||||||","0"),
"4" => array ("News||News||||||||","4")
);

Notice that the column's labels have the old-style language wrap format.
That means that the label for each language is defined in *one* string and
separated by the | sign.

My example contains even more than the four standard-columns. But defining
the number and order of columns is done elsewhere (have a look into the
TSconfig
manual, section "MOD").

Dander ·

In "localconf.php" folgende zeile adden

$typo_db_extTableDef_script = 'extTables.php';

und dann die datei "extTables.php" erstellen mit folgendem code:

<?php
/**
* Extension script.
*
* You are strongly recommended to use the distributed tables.php file found in t3lib/install/tables.php. 
* However extending and/or modifying the content of tables.php is done with scripts like this. 
* Or BETTER yet - with extensions like those found in the typo3conf/ext/ or typo3/ext/ folder. 
* Extensions are movable to other Typo3 installations and provides a much better division between things! Use them!
*
* Information on how to set up tables is found in the document "Inside Typo" available as a PDF from where you downloaded Typo3.
*/


/**
* This adds an extra tt_content column (colPos=4), before the last column (Border):
* The function array_splice works directly on the input array!
*/
t3lib_div::loadTCA('tt_content'); // Make sure the whole tt_content configuration is loaded, before we can modify it!


if (is_array($TCA['tt_content'])) {
array_splice(
$TCA['tt_content']['columns']['colPos']['config']['items'], // The list of items
-1, // To insert one position from the end of the list
0, // Don't remove any items, just insert
array(array('Extra Column|Ekstra kolonne',4)) // Element to be inserted. Value is '4' and language is specified for english and danish.
);
}


$TCA['tt_content']['columns']['colPos']['config']['items'][1][0]='NEU1:';
$TCA['tt_content']['columns']['colPos']['config']['items'][2][0]='NEU2:';
$TCA['tt_content']['columns']['colPos']['config']['items'][0][0]='NEU3:';
$TCA['tt_content']['columns']['colPos']['config']['items'][3][0]='NEU4:';
$TCA['tt_content']['columns']['colPos']['config']['items'][4][0]='NEU5:';
?>

[0][1][2][3] stehen für normal,links,rechts und rand
und NEU1 usw. sind die neuen namen

Um die 5. ebene mit dem namen NEU5 anzuzeigen musst du im
TS-Config follgendes eintragen:
mod.SHARED.colPos_list = 0,1,2,3,4,5

Zed412 ·

Hy Leute,

ich habe da gerade eine Extension und ein kleines HowTo dafür gebastelt.
Zu finden ist das Ganze auf Typo3.org, die Extension heißt zed_more_columns.

Lg

Zed 8-)

Flo P.​ ·

vielen dank,

habe es schon in verwendung klappt super. habe noch mehr columns gebraucht - auch das ist kein problem. einfach in der ext_tables in dem extension ordner den array erweitern. für alle die noch mehr brauchen 😉

grüße,

flo

voss ·

hum so richtig klappen will des mit der extention nicht, hab sie runtergeladen und installiert, aber angezeigt werden die weiteren spalten nicht, muss ich da vielleicht noch beim typoscript oder bei den constanten was einschreiben ?

wenn ja, wäre es schön, wenn ihr ma postet was und wo

des weiteren würde mich dann mal interessieren, wie ich dann die inhalte der spalten ins template bekomme.

vorher wa es ja so:

page.10.marks.LINK = CONTENT 
page.10.marks.LINK < styles.content.get

wie ist es jetzt? und wie werden dann die neuen Spalten bezeichnet ?

bin für jede antwort dankbar

Schmoozer ·

Wie oben schon von Dander gepostet:

mod.SHARED.colPos_list = 0,1,2,3,4,5,...

in den TS-Config bereich in den Benutzeroptionen schreiben.

voss ·

und wie kriege ich das dann hin, das ich einem marker genau diese spalte zurodne ?

Schmoozer ·

Im Setup, wie bei den anderen auch,
mit :

marks.NAME <styles.content.getRight

bei getRight den namen angeben, den du der neuen Spalte gegeben hast.
z.B.: getSpalte

voss ·

ich hab die anleitung gesucht, aber hatte sie nicht gefunden.
ich werde jetzt mal ausprobieren, ob es bei mir funktioniert. 😃

edit:

hat funktioniert, allerdings kriege ich das nicht hin, noch eine spalte hinzuzufügen :o

kann mir vielleicht jemand die nötigen datein so modifizieren, das ich 6 Spalten habe ?

bisher werden nur 5 angezeigt, die ich benutzen kann, allerdings benötige ich 6.

wenn es nicht zu viele umstände macht.
wäre nett.

danke schonmal im vorraus !

Dander ·

mit meinem script von oben

$TCA['tt_content']['columns']['colPos']['config']['items'][5][0]='NEU6:';

noch unter die letzte spalte

und dann
mod.SHARED.colPos_list = 0,1,2,3,4,5

MFG

Dander

doku ·

@voss:
ich werde das unbestimmte gefühl nicht los, daß du denkst, du bräuchtest für jedes inhaltselement das du einfügen möchtest, eine eigene backendspalte...

hab ich gewonnen? 😉

Dander ·
doku schrieb

@voss:
ich werde das unbestimmte gefühl nicht los, daß du denkst, du bräuchtest für jedes inhaltselement das du einfügen möchtest, eine eigene backendspalte...

hab ich gewonnen? 😉

lol

1. Platz

aber ist ein gut strukturierter auftritt

Dander ·

naja wird wohl für einen internetauftritt sein oda nicht??

MFG

Dander

P.S:nicht alles was ich sage ist ernst gemeint

voss ·

@doku

das hast du richtig erkannt, da ich ansonsten zwischen den einzelnen inhalten ein HTML element oder etwas derartiges ainfügen muss, was dann allerdings unübersichtlich wird.

ich wollte das so machen, das ich meine 6 marker in dem template habe und diese dann halt ganz normal ersetze. 😃

ps:

@ dander: habs so eingefügt, wie du gesagt hast, nur wird die spalte trotzdem nicht angezeigt. (ist dann auch die lezte benötigte spalte 😉 )

<?php 
/** 
* Extension script. 
* 
* You are strongly recommended to use the distributed tables.php file found in t3lib/install/tables.php. 
* However extending and/or modifying the content of tables.php is done with scripts like this. 
* Or BETTER yet - with extensions like those found in the typo3conf/ext/ or typo3/ext/ folder. 
* Extensions are movable to other Typo3 installations and provides a much better division between things! Use them! 
* 
* Information on how to set up tables is found in the document "Inside Typo" available as a PDF from where you downloaded Typo3. 
*/ 


/** 
* This adds an extra tt_content column (colPos=4), before the last column (Border): 
* The function array_splice works directly on the input array! 
*/ 
t3lib_div::loadTCA('tt_content'); // Make sure the whole tt_content configuration is loaded, before we can modify it! 


if (is_array($TCA['tt_content'])) { 
array_splice( 
$TCA['tt_content']['columns']['colPos']['config']['items'], // The list of items 
-1, // To insert one position from the end of the list 
0, // Don't remove any items, just insert 
array(array('Extra Column|Ekstra kolonne',4)) // Element to be inserted. Value is '4' and language is specified for english and danish. 
); 
} 


$$TCA['tt_content']['columns']['colPos']['config']['items'][1][0]='NEU1:'; 
$TCA['tt_content']['columns']['colPos']['config']['items'][2][0]='Rechts:'; 
$TCA['tt_content']['columns']['colPos']['config']['items'][0][0]='Links:'; 
$TCA['tt_content']['columns']['colPos']['config']['items'][3][0]='Aussen:'; 
$TCA['tt_content']['columns']['colPos']['config']['items'][4][0]='Rand:';
$TCA['tt_content']['columns']['colPos']['config']['items'][5][0]='NEU6:'; 
?>

und :

mod.SHARED.colPos_list = 0,1,2,3,4,5
voss ·

ich habe gerade gesehen, das ich in der spalte einen inhalt anlegen kann unzwar über: "Neuer Inhalt" dann halt was fürn inhalt und dann die spalte, die dort auch angezeigt wird aber ohne bezeichnung.
und normal, wenn ich auf die seite im backend komme, wo die spalten mit den inhalten angezeigt werden, sind alle spalten ausser halt diese eine dargestellt...
ich brauche die dort aber dargestellt, da ich diese ja später auch wieder bearbeiten möchte...

wäre cool, wenn mir da geholfen werden kann

doku ·

korrigier erstmal mal deinen code

$$TCA['tt_content']['columns']['colPos']['config']['items'][1][0]='NEU1:';