Új hozzászólás Aktív témák

  • pelyib

    tag

    válasz radi8tor #19402 üzenetére

    Úgy látom, hogy a templatehez nem kell nyúlni. Happy debugging :)

    <?php
    $seo = [];
    $seoMenuElementChildren = [];

    if ($this->user->hasPermission('access', 'extension/extension/module') && $this->config->get('module_301redirect_status'))
    {
    $redirect301[] = [
    'name' => $this->language->get('text_seo_301redirect'),
    'href' => $this->url->link('extension/module/301redirect', 'user_token=' . $this->session->data['user_token'], true),
    'children' => [],
    ];
    }
    if (isset($redirect301))
    {
    $seoMenuElementChildren[] = $redirect301;
    }
    if ($this->user->hasPermission('access', 'extension/extension/module') && $this->config->get('module_302redirect_status'))
    {
    $redirect302[] = [
    'name' => $this->language->get('text_seo_302redirect'),
    'href' => $this->url->link('extension/module/302redirect', 'user_token=' . $this->session->data['user_token'], true),
    'children' => [],
    ];
    }
    if (isset($redirect302))
    {
    $seoMenuElementChildren[] = $redirect302;
    }

    if (!empty($seoMenuElementChildren))
    {
    $data['menus'][] = [
    'id' => 'menu-seo',
    'icon' => 'fa-search',
    'name' => $this->language->get('text_seo'),
    'href' => '',
    'children' => $seoMenuElementChildren,
    ];
    }

Új hozzászólás Aktív témák