# Prüfung auf leere Variable

**URL:** https://forum.shopware.com/t/prufung-auf-leere-variable/46170
**Category:** Themes & Design
**Created:** [6. Juni 2017 um 11:48 UTC](https://forum.shopware.com/t/prufung-auf-leere-variable/46170 "2017-06-06T11:48:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ABC9](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@ABC9](https://forum.shopware.com/u/ABC9)
#### Post date: [6. Juni 2017 um 11:48 UTC](https://forum.shopware.com/t/prufung-auf-leere-variable/46170/1 "2017-06-06T11:48:34Z")

</div>

```
       $data = [
            'id' => $category->getId(),
            'parentId' => $category->getParentId(),
            'name' => $category->getName(),
            'position' => $category->getPosition(),
            'metaTitle' => $category->getMetaTitle(),
            'metaKeywords' => $category->getMetaKeywords(),
            'metaDescription' => $category->getMetaDescription(),
            'cmsHeadline' => $category->getCmsHeadline(),
            'cmsText' => $category->getCmsText(),
            'active' => true,
            'template' => $category->getTemplate(),
            'productBoxLayout' => $this->getProductBoxLayout($category),
            'blog' => $category->isBlog(),
            'path' => $categoryPath,
            'external' => $category->getExternalLink(),
            'hideFilter' => !$category->displayFacets(),
            'hideTop' => !$category->displayInNavigation(),
            'changed' => null,
            'added' => null,
            'attribute' => $attribute,
            'attributes' => $category->getAttributes(),
            'media' => $media,
            'mediaId' => $category->getMedia() ? $category->getMedia()->getId() : null,
            'link' => $this->getCategoryLink($category),
            'streamId' => $productStream ? $productStream['id'] : null,
            'productStream' => $productStream,
            'childrenCount' => $this->getCategoryChildrenCount($category->getId()),
            'description' => $category->getName(),
            'cmsheadline' => $category->getCmsHeadline(),
            'cmstext' => $category->getCmsText(),
            'sSelf' => $detailUrl,
            'sSelfCanonical' => $canonical,
            'canonicalParams' => $canonicalParams,
            'rssFeed' => $detailUrl . '&sRss=1',
            'atomFeed' => $detailUrl . '&sAtom=1'
        ];

{* Title *}
{block name='frontend_index_header_title'}{strip}
    {if $sCategoryContent.metaTitle}
        {$sCategoryContent.metaTitle|escapeHtml} | {{config name=sShopname}|escapeHtml}
    {elseif $sCategoryContent.title}
        {$sCategoryContent.title|escapeHtml} | {{config name=sShopname}|escapeHtml}
    {else}
        {$smarty.block.parent}
    {/if}
{/strip}{/block}

```

&nbsp;

Kann mir jemand mal verraten warum hier auf **$sCategoryContent.titel** geprüft wird, wenn nirgendswo ein title an das Template übergeben wird?
