View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Slaven Rezić > WE_Framework-0.097_03 > WE_Frontend::Plugin::WE_Navigation::Object



Annotate this POD

Module Version: 1.15   Source  


WE_Frontend::Plugin::WE_Navigation::Object - object for WE_Navigation plugin


    Normally not instantiated.


This is a specialization of WE_Frontend::Plugin::Navigation::Object. This class has additional methods for retrieving language titles, relative and absolute urls.



Return default extension (by default ".html"). May be overwritten in a subclass.


The language dependent title. lang is optional. English will be used if other means to determine the language fail.


Short title. (NYI)


Return a relative URL to the object.

Use the name from NameDB if available. See also the $IGNORE_NAME_DB variable to turn this feature of.

If the object is an folder, then the IndexDoc doc is used instead for the URL. If IndexDoc is undefined, then the autoindexdoc feature handling fires. This feature may be turned off by $DONT_USE_INDEXDOC.


Return a half-absolute URL (without scheme, host and port part) to the object.


Return an absolute URL (with scheme, host and port part) to the object.


Return the window target to the object. Currently this is always "_self".


Return true if the object should be included to the navigation. The following cases cause the object to be excluded from the navigation:

  • The object's attribute Release_State is not released
  • The object's attribute Navigation is hidden
  • The object is not ready to be published as determined by TimeOpen and TimeExpire. The current date can be adjusted by setting the template variable to a unix epoch time.

Some objects may not have content of their own and use the first child in their collection instead for getting attributes like Title etc. By default, this method just returns the object itself, but may be overriden. See WE_Frontend::Plugin::WE_Navigation for an example.

$caller will be set to a symbolic name of the caller: title (for methods like lang_title), url (for methods like relurl), or navigation) (for include_in_navigation and similar methods). If you need the real caller function name, then use the standard caller function.


For a given object, determine which version of the object should be used. The default implementation of version_proxy is to return the last released version (using get_released_object from WE::DB::Obj), or, if no object is released, the latest version. Subclasses are free to override this method.



If set to a true value, then do not use the name database in relurl.


If set to a true value, then neither use the IndexDoc nor the autoindexdoc features.


Here are some examples for using this plugin in templates:

    [% USE n = WE_Navigation -%]
    [% FOR p = n.siblings -%]
      [% IF p.include_in_navigation -%]
      <a href="[% p.relurl | html %]">[% p.lang_title | html %]</a><br />
      [% END -%]
    [% END -%]


From version 1.11 the relurl and related methods handle the IndexDoc value of folders and in absence of this value look at the autoindexdoc feature.

From version 1.09 the relurl and related methods prefer to construct a symbolic URL with the help of the NameDB. Older versions always constructed an URL using the numerical id.


Slaven Rezic -



syntax highlighting: