Important. We are closed. Due to decreased amount of time available, we don't accept new orders and we don't provide support for existing ones.

- MANADEV is the best, excellent support (5-Star)

Aug 22, 2012 Absolutex

Certified Magento Enterprise developer Certified Magento developer Certified Magento theme developer Certified Magento specialist

Manadev is certified extension and theme
developer for Magento

Variable Reference

Contents:


$value

Default output value of current filter-specific template:

  • in description.phtml, this variable equals original page description;
  • in meta_keywords.phtml, this variable equals original page meta keywords;
  • and so on.

$filters

Array of all currently applied filter items. All entries in this array are of FilterData class.

FilterData Class

This class is defined in Manadev/LayeredNavigationSeo/Data/FilterData.php file.

Properties:

  • filter - model object loaded from mana_filter database table. For more information, check definition on mana_filter table.
  • filter_name - internal filter name. For attribute-based filters it is attribute code.
  • filter_title - visual filter title as seen in applied filter list in store frontend.
  • item - array representing one applied item. The following array key may be of interest:
    • 'value' - internal filter value. In case of dropdown filter item, it is attribute option ID.
  • item_label - filter item label as seen in applied filter list in store frontend.
  • included - true if filter is included, false if excluded. Excluded filter items are omitted by $this->filters()->allIncluded() and $this->filters()->countIncluded() methods and are typically not added to meta attributes after original value. For more information, see Excluded Filters.

Excluded Filters

Excluded filter items are omitted by $this->filters()->allIncluded() and $this->filters()->countIncluded() methods and are typically not added to meta attributes after original value. By default, meta_title.phtml template contains the following code:

$filterCount = $this->filters()->countIncluded();
foreach ($this->filters()->allIncluded() as $index => $filter) {
    if ($index == 0) {
        echo __(": ");
    }
    elseif ($index < $filterCount - 1) {
        echo __(", ");
    }
    else {
        echo __(" and ");
    }

    echo $filter->item_label;
}

This code iterates through all filter items which are not excluded and adds them to meta title. Similar logic can be found in default meta_description.phtml and meta_keywords.phtml.

Filter items can be excluded in 2 ways:

  • in Admin Panel by setting Manadev->Filter Settings->Edit [some filter]->SEO Settings->Include In Meta Title = No. This setting excludes all filter values in meta_title.phtml template. Include In Meta Description = No and Include In Meta Keywords = No excludes filter in meta_description.phtml and meta_keywords.phtml.

  • You can exclude whole filter or individual filter value in customized template:

    // the following line marks all applied items of `activity` filter as excluded
    $this->filter('activity')->exclude();
    
    // the following line marks only "activity=Gym" applied item as excluded
    $this->filter('activity')->exclude('Gym');
    

$keyword

Search term on quick search page.

$route

Internal route name of current page type:

  • catalog/category/view means category page.
  • catalogsearch/result/index means quick search page.
  • cms/page/view means CMS page (but not home page).
  • cms/index/index means CMS home page.

$params

Array of route parameters. On category and CMS pages id parameter contains ID of current category or CMS page.

$query

Array of query parameters. Query parameters conmally contains unprocessed array of applied filters and applied product list toolbar preferences.

$page

Current product list toolbar page number.

$order

Current product list toolbar sort order setting.

$dir

Current product list toolbar sort direction.

$mode

Current product list toolbar mode.

$show

Current product list toolbar number of products per page.

We Accept: PayPal Visa MasterCard American Express Discover