GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Interchange6::Schema::Result::Navigation(3) User Contributed Perl Documentation Interchange6::Schema::Result::Navigation(3)

Interchange6::Schema::Result::Navigation

Navigation is where all navigation, category and static page details are stored. In addition information such as page title can be linked to these records as attributes.
Attribute
Common attribute names for a Navigation records include these examples.

meta_title meta_description meta_keywords head_js head_css

NOTE: with items such as head_css which may contain more than one record you must set the priority of the record. This ensures each record has a unique value and also allows for proper ordering.

    $nav->add_attribute({name => 'head_css', priority => '1'}, '/css/main.css');
    $nav->add_attribute({name => 'head_css', priority => '2'}, '/css/fancymenu.css');

Primary key.

URI.

Unique constraint. Is nullable.

See "generate_uri" method for details of how "uri" can be created automatically based on the value of "name".

Type, e.g.: nav, category.

Scope, e.g.: menu-main, top-login.

Name, e.g.: Hand Tools, Fly Fishing Rods.

Defaults to empty string.

Description, e.g.: All of our hand tools, Our collection of top fly fishing rods.

Defaults to empty string.

FK on "navigation_id" in Interchange6::Schema::Result::Navigation.

Can be used for things such as menus in different languages which link back to the primary navigation menu.

Is nullable.

Used by DBIx::Class::Tree::AdjacencyList to setup parent/child relationships.

Is nullable.

Signed integer priority. We normally order descending.

Defaults to 0.

Can be used to cache product counts.

Default to 0.

Date and time when this record was created returned as DateTime object. Value is auto-set on insert.

Date and time when this record was last modified returned as DateTime object. Value is auto-set on insert and update.

Whether navigation is active and therefore should be displayed.

Boolean defaults to true (1).

Attribute methods are provided by the Interchange6::Schema::Base::Attribute class.

Override inherited method to call "generate_uri" method in case "name" has been supplied as an argument but "uri" has not.

NOTE: is uri is supplied and is undefined then "generate_uri" is not called.

See "with_active_child_count" in Interchange6::Schema::ResultSet::Navigation for a resultset method which will prefill this data.

See "with_active_product_count" in Interchange6::Schema::ResultSet::Navigation for a resultset method which will prefill this data.

Called by "new" if no uri is given as an argument.

The following steps are taken:

1. Stash "$self->name" in $uri to allow manipulation via filters

2. Remove leading and trailing spaces and replace remaining spaces and "/" with "-"

3. Search for all rows in Interchange6::Schema::Result::Setting where "scope" is "Navigation" and "name" is <generate_uri_filter>

4. For each row found eval "$row->value"

5. Finally set the value of column "uri" to $uri

Filters stored in Interchange6::Schema::Result::Setting are executed via eval and have access to $uri and also the navigation result held in $self

Examples of filters stored in Setting might be:

    {
        scope => 'Navigation',
        name  => 'generate_uri_filter',
        value => '$uri =~ s/badstuff/goodstuff/gi',
    },
    {
        scope => 'Navigation',
        name  => 'generate_uri_filter',
        value => '$uri = lc($uri)',
    },

Similar to the inherited siblings method but also returns the object itself in the result set/list.

  • parent
  • ancestors
  • has_descendant
  • parents
  • children
  • attach_child
  • siblings
  • attach_sibling
  • is_leaf
  • is_root
  • is_branch

Related object: Interchange6::Schema::Result::Navigation

Conditions: self.parent_id = foreign.navigation_id && foreign.active = 1

Type: has_many

Related object: Interchange6::Schema::Result::MediaNavigation

Type: has_many

Related object: Interchange6::Schema::Result::NavigationProduct

Type: many_to_many

Accessor to related product results ordered by priority and name.

Type: has_many

Related object: Interchange6::Schema::Result::NavigationAttribute

Type: many_to_many

Accessor to related attribute results.

Type: has_many

Related object: Interchange6::Schema::Result::NavigationMessage

Type: many_to_many

Accessor to related Message results.

2016-07-16 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.