Zum Inhalt springen

Erweiterungstemplate Problem

Erstellt am 7. April 2016 · 5 Antworten · letzte Antwort am 7. April 2016

Tags: Frage

3dxO ·

Hallo,

als ich heute an einer Seite weiterarbeiten wollte habe ich festgestellt, dass ein Erweiterungstemplate auf einmal nicht mehr funktioniert.

Ich habe keine Änderungen daran vorgenommen. Gibt es irgend eine Möglichkeit herauszufinden was da los ist? Gibt es sowas wie eine Debug Info des Templates??

Hier mal das Erweiterungstemplate:

/*
[treeLevel = 1]
temp.submenu = HMENU
temp.submenu {
excludeUidList = 69
entryLevel = 1
1 = TMENU
1 {      
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  IFSUB = 1
  IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
  ACT < .NO
  ACT = 1
  ACT.wrapItemAndSub = <li class="active">|</li>
  ACT.ATagParams = class="active"    
  ACTIFSUB = 1
  ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
  ACTIFSUB.ATagParams = class="active"  
}
}

[treeLevel = 2]
temp.submenu = HMENU
temp.submenu {
entryLevel = 2
1 = TMENU
1 {      
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  IFSUB = 1
  IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
  ACT < .NO
  ACT = 1
  ACT.wrapItemAndSub = <li class="active">|</li>
  ACT.ATagParams = class="active"    
  ACTIFSUB = 1
  ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
  ACTIFSUB.ATagParams = class="active"  
}
stdWrap.ifEmpty.cObject = HMENU
stdWrap.ifEmpty.cObject {
entryLevel = 1
1 = TMENU
1 {      
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  IFSUB = 1
  IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
  ACT < .NO
  ACT = 1
  ACT.wrapItemAndSub = <li class="active">|</li>
  ACT.ATagParams = class="active"    
  ACTIFSUB = 1
  ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
  ACTIFSUB.ATagParams = class="active"  
}
}

[treeLevel = 3]
temp.submenu = HMENU
temp.submenu {
entryLevel = 3
1 = TMENU
1 {      
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  IFSUB = 1
  IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
  ACT < .NO
  ACT = 1
  ACT.wrapItemAndSub = <li class="active">|</li>
  ACT.ATagParams = class="active"    
  ACTIFSUB = 1
  ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
  ACTIFSUB.ATagParams = class="active"  
}
stdWrap.ifEmpty.cObject = HMENU
stdWrap.ifEmpty.cObject {
entryLevel = 2
1 = TMENU
1 {      
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  IFSUB = 1
  IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
  ACT < .NO
  ACT = 1
  ACT.wrapItemAndSub = <li class="active">|</li>
  ACT.ATagParams = class="active"    
  ACTIFSUB = 1
  ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
  ACTIFSUB.ATagParams = class="active"  
}
}

[treeLevel = 4]
temp.submenu = HMENU
temp.submenu {
entryLevel = 4
1 = TMENU
1 {      
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  IFSUB = 1
  IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
  ACT < .NO
  ACT = 1
  ACT.wrapItemAndSub = <li class="active">|</li>
  ACT.ATagParams = class="active"    
  ACTIFSUB = 1
  ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
  ACTIFSUB.ATagParams = class="active"  
}
stdWrap.ifEmpty.cObject = HMENU
stdWrap.ifEmpty.cObject {
entryLevel = 3
1 = TMENU
1 {      
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  IFSUB = 1
  IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
  ACT < .NO
  ACT = 1
  ACT.wrapItemAndSub = <li class="active">|</li>
  ACT.ATagParams = class="active"    
  ACTIFSUB = 1
  ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
  ACTIFSUB.ATagParams = class="active"  
}
}
[end]
*/

temp.content = CONTENT
temp.content {
slide = -1;
table = tt_content

select.orderBy = sorting
select.where = colPos = 0
select.languageField = sys_language_uid
}

temp.zusatzinfo = COA 
temp.zusatzinfo {
wrap = <div id="zusatzinfo">|</div>
10 = CONTENT
10 {
  table = tt_content
  select.orderBy = sorting
  select.where = colPos = 2
  select.languageField = sys_language_uid
}
}

temp.inhalt = COA
temp.inhalt {
10 = TEXT
10.value = <div id="submenu" class="noprint"><div><ul>
20 = COA
20 < temp.submenu
30 = TEXT
30.wrap = </ul><p><br><br>|</p>
30.value = ....
40 = COA
40 < temp.zusatzinfo
50 = TEXT
50.value = </div></div>
60 = COA
60 < temp.content
60.wrap = <div id="content">|</div>
}

page.bodyTagAdd = data-cat="product"

page.30.30 = COA
page.30.30 < temp.inhalt
page.30.30.wrap = <div id="inhalt">|</div>

Ich habe die Menü-Geschichte auskommentiert und zumindest die Zusatzinfo wird dann angezeigt. Also scheint da irgendwie der Wurm drin zu sein. Was ich nicht verstehe warum es bisher funktioniert hat und jetzt nicht mehr.

Ziel der Übung ist es, ein Untermenü zu zeigen welches immer die nächste Tiefe anzeigt. Oder, wenn da keine Unterseiten mehr sind die aktuelle Tiefe.

Ich bin total verzweifelt.. wäre schön wenn da mal jemand draufschauen könnte.

3dxO ·

es scheint definitiv mit dem ifEmpty gedöns zu tun zu haben. Kann mir da jemand n Tipp geben, was ich machen muss um im Falle wenn keine Unterseiten vorhanden sind, die aktuelle Ebene anzuzeigen?

Aktueller Zustand:

[treeLevel = 1]
temp.submenu = HMENU
temp.submenu {
entryLevel = 1
1 = TMENU
1 {      
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  IFSUB = 1
  IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
  ACT < .NO
  ACT = 1
  ACT.wrapItemAndSub = <li class="active">|</li>
  ACT.ATagParams = class="active"    
  ACTIFSUB = 1
  ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
  ACTIFSUB.ATagParams = class="active"  
}
}
[treeLevel = 2]
temp.submenu = HMENU
temp.submenu {
entryLevel = 2
1 = TMENU
1 {      
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  IFSUB = 1
  IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
  ACT < .NO
  ACT = 1
  ACT.wrapItemAndSub = <li class="active">|</li>
  ACT.ATagParams = class="active"    
  ACTIFSUB = 1
  ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
  ACTIFSUB.ATagParams = class="active"  
}
}
[treeLevel = 3]
temp.submenu = HMENU
temp.submenu {
entryLevel = 3
1 = TMENU
1 {      
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  IFSUB = 1
  IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
  ACT < .NO
  ACT = 1
  ACT.wrapItemAndSub = <li class="active">|</li>
  ACT.ATagParams = class="active"    
  ACTIFSUB = 1
  ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
  ACTIFSUB.ATagParams = class="active"  
}
}
[treeLevel = 4]
temp.submenu = HMENU
temp.submenu {
entryLevel = 4
1 = TMENU
1 {      
  expAll = 1
  NO.wrapItemAndSub = <li>|</li>
  IFSUB = 1
  IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
  ACT < .NO
  ACT = 1
  ACT.wrapItemAndSub = <li class="active">|</li>
  ACT.ATagParams = class="active"    
  ACTIFSUB = 1
  ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
  ACTIFSUB.ATagParams = class="active"  
}
}
[end]

So funktioniert es bis auf den letzten Schritt. Wenn keine Unterseiten mehr vorhanden sind wird auch nichts angezeigt.

3dxO ·

und warum funktioniert es wenn im Template for treeLevel folgende Zeilen enthalten sind:
/*

*/

und wenn ich die wegnehme, dann nicht mehr? Ich werd hier kirre 😐

3dxO ·

Und da war der Knackpunkt 😃 im Haupt-Template war ein Kommentar nicht geschlossen... jetzt klappt alles so wie es ganz am Anfang der Fall war...

Mannomann, jetzt bin ich echt erleichert 😃

3dxO ·

Und da war der Knackpunkt 😃 im Haupt-Template war ein Kommentar nicht geschlossen... jetzt klappt alles so wie es ganz am Anfang der Fall war...

Mannomann, jetzt bin ich echt erleichtert 😃

3dxO ·

Und da war der Knackpunkt 😃 im Haupt-Template war ein Kommentar nicht geschlossen... jetzt klappt alles so wie es ganz am Anfang der Fall war...

Mannomann, jetzt bin ich echt erleichtert 😃

Und falls jemand die gekürzte Fassung für so ein Untermenü gebrauchen kann, hier mein Script:

lib._submenu = HMENU
lib._submenu {
	1 = TMENU
	1 {      
		expAll = 1
		NO.wrapItemAndSub = <li>|</li>
		IFSUB = 1
		IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
		ACT < .NO
		ACT = 1
		ACT.wrapItemAndSub = <li class="active">|</li>
		ACT.ATagParams = class="active"    
		ACTIFSUB = 1
		ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
		ACTIFSUB.ATagParams = class="active" 
		SPC = 1
		SPC.wrapItemAndSub = <li class="trenner">|</li>
		SPC.doNotShowLink = 0 
	}
	stdWrap.ifEmpty.cObject = HMENU
	stdWrap.ifEmpty.cObject {
		1 = TMENU
		1 {      
			expAll = 1
			NO.wrapItemAndSub = <li>|</li>
			IFSUB = 1
			IFSUB.wrapItemAndSub = <li class="hasSub">|</li>
			ACT < .NO
			ACT = 1
			ACT.wrapItemAndSub = <li class="active">|</li>
			ACT.ATagParams = class="active"    
			ACTIFSUB = 1
			ACTIFSUB.wrapItemAndSub = <li class="hasSub active">|</li>
			ACTIFSUB.ATagParams = class="active" 
			SPC = 1
			SPC.wrapItemAndSub = <li class="trenner">|</li>
			SPC.doNotShowLink = 0 
		}
	}
}
[treeLevel = 1]
lib._submenu = HMENU
lib._submenu {
	entryLevel = 1
}

[treeLevel = 2]
lib._submenu = HMENU
lib._submenu {
	entryLevel = 2
	stdWrap.ifEmpty.cObject = HMENU
	stdWrap.ifEmpty.cObject {
		entryLevel = 1
	}
}

[treeLevel = 3]
lib._submenu = HMENU
lib._submenu {
	entryLevel = 3
	stdWrap.ifEmpty.cObject = HMENU
	stdWrap.ifEmpty.cObject {
		entryLevel = 2
	}
}

[treeLevel = 4]
lib._submenu = HMENU
lib._submenu {
	entryLevel = 4
	stdWrap.ifEmpty.cObject = HMENU
	stdWrap.ifEmpty.cObject {
		entryLevel = 3
	}
}
[end]