To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Ticket #236 (closed defect: fixed)

Opened 23 months ago

Last modified 21 months ago

Document the home_as_tab: true to a-navigation from tabs component

Reported by: rickybanister Owned by: boutell
Priority: critical Milestone: 1.4
Component: apostrophePlugin Version:
Keywords: aNavigation Cc: rickybanister, agilbert, johnnyoffline, hillerj, boutell, geoffd,
Symfony version: 1.4

Description

The old navigation component had an app.yml feature where you could turn the 'home' tab on in the main nav tabs.

The new a-navigation component, while being more flexible and awesome, does not listen to that yml setting.

Could it be ported over so that the first tab in your navigation be home if you've set that to true?

Change History

Changed 22 months ago by dordille

  • cc rickybanister, agilbert, johnnyoffline, hillerj, boutell, geoffd, added
  • keywords aNavigation added; a-nav removed

So I would prefer to create something that is a little more expandable then a setting in app.yml. My first thought was to do something like the following in your templates.

include_component('aNavigation', 'tabs', array('custom' => array(
  '/' => 'Home', 'http://www.google.com' => 'Google')));

Changed 22 months ago by boutell

It's baaaaaaaack (I had this custom tabs feature in there away back when)

Implementing a 'current' class for the custom URLs is going to be interesting. Have to be careful not to get confused by the frontend controller in the URL

Changed 21 months ago by rickybanister

  • priority changed from major to critical

Changed 21 months ago by dordille

  • owner changed from dordille to rickybanister
  • status changed from new to assigned

Rick can you give me confirmation that this is working now.

Changed 21 months ago by dordille

  • owner changed from rickybanister to dordille

Changed 21 months ago by dordille

  • owner changed from dordille to boutell

This functionality exists for pages within the page hierarchy as follows. By passing the option extras to the tabs navigation component you can add additional pages to a navigation element.

Example:

<?php include_component('aNavigation', 'tabs', array('root' => '/', 'active' => $page['slug'], 'name' => 'main', 'draggable' => true, 'dragIcon' => false, 'extras' => array('/m' => 'Home'))) # Top Level Navigation ?>

Changed 21 months ago by dordille

You can also specify external urls instead of page slugs in the extras options.

Example:

<?php include_component('aNavigation', 'tabs', array('root' => '/', 'active' => $page['slug'], 'name' => 'main', 'draggable' => true, 'dragIcon' => false, 'extras' => array('http://www.google.com' => 'Google'))) # Top Level Navigation ?>

Changed 21 months ago by rickybanister

  • summary changed from Port home_as_tab: true to a-navigation from tabs component to Document the home_as_tab: true to a-navigation from tabs component

Changed 21 months ago by boutell

  • status changed from assigned to closed
  • resolution set to fixed

This got done yesterday

Note: See TracTickets for help on using tickets.