* Update auf Twig 2 (notwendig, da block() bei Twig 1 '' statt null zurückgibt. Somit kann nicht unterschieden werden, ob ein Block nicht definiert wurde oder leer ist; das ist wiederum notwendig, damit Templates die Blöcke in sidebar.html.twig auch mit leerem Inhalt überschreiben können)
* Symfony-Update * Behoben: Reisemagazin/-führer Slider zeigt deaktivierte Seiten an; Begrenzung auf 3 Einträge entfernt * Behoben: Angebote werden nicht überall angezeigt * Land einer Seite von übergeordneten Seiten erben (getEffectiveCountry()) * Seitentemplate "offers": Diese Seiten haben unten im Body ein Angebots-Karusell * Templates ohne Controller action werden jetzt unterstützt. Falls keine Action existiert, wird einfach ein gleichnamiges twig-Template gerendert git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3303 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
bf69f20a50
commit
ce292748fb
14 changed files with 662 additions and 288 deletions
|
|
@ -1199,4 +1199,20 @@ class Page
|
|||
{
|
||||
return $this->lft != null && $this->rgt != null && $this->rgt - $this->lft > 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return TravelCountry|null The country. If no country is set, trace the ancestor page nodes for a country.
|
||||
*/
|
||||
public function getEffectiveCountry()
|
||||
{
|
||||
$node = $this;
|
||||
do
|
||||
{
|
||||
if ($node->getCountry())
|
||||
{
|
||||
return $node->getCountry();
|
||||
}
|
||||
} while ($node = $node->getParent());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue