Innerhalb einer CONTENTAREALIST auf diese zugreifen
Author: RZoller
Publication Date: 10/20/2010 10:08
Hallo zusammen,
ich habe folgendes Problem:
Ich habe zwei Vorlagen mit der gleichen CONTENTAREALIST aufgebaut:
<CMS_INPUT_CONTENTAREALIST name="cs_contacts_ordered" hFill="yes" rows="2">
<LANGINFOS>
<LANGINFO lang="*" label="Ansprechpartner"/>
<LANGINFO lang="EN" label="Contact Person"/>
</LANGINFOS>
<SOURCES>
<TEMPLATE name="ansprechpartnereintrag"/>
</SOURCES>
</CMS_INPUT_CONTENTAREALIST>
Abhängig von der Vorlage muss die Anzeige aber etwas verändert werden, so dass ich innerhalb von "ansprechpartnereintrag" herausfinden muss, aus welcher Vorlage "ansprechpartnereintrag" aufgerufen wurde. Ist dies möglich?
Ich habe innerhalb von "ansprechpartnereintrag" schon $CMS_VALUE(#global.section.getParent())$ versucht, bekomme aber immer null zurückgeliefert.
Vielen Dank für die Hilfe!
René Zoller
Tags: contentarealist, fs4.2
-
Author: feddersen - 10/20/2010 12:31
Ich habe mal sowas umgesetzt, mit folgender Logik. Es handelt sich auch um eine ContentAreaList, die ineinander verschachtelt werden kann.
$--
The first nested grid (grid inside a grid) needs to have the "first" class applied
Context for a nested grid looks like this: page -> section -> for -> section
So we check if the parent.parent is a section and if that section is the first section-list in the widgetcontainer
--$
$CMS_IF(#global.context.parentContext.parentContext != null && #global.context.parentContext.parentContext.name == "section" && #global.context.parentContext.parentContext.definedVariableValue("set_st_isFirstColumn"))$
$CMS_SET(set_st_isFirstNestedContainer," first")$
$CMS_ELSE$
$CMS_SET(set_st_isFirstNestedContainer,"")$
$CMS_END_IF$0
Please sign in to leave a comment.
Comments
1 comment