file FrontendNavigation.php

version 1.1.0
author Willi Man
copyright four for business AG <www.4fb.de>
created 25.03.2005
modified 22.11.2005

 Methods

Constructor

FrontendNavigation($db, $cfg, $cfgClient, $client, $lang) 

Parameters

$db

$cfg

$cfgClient

$client

$lang

Get category name

getCategoryName($cat_id) 

Parameters

$cat_id

Get category of article.

getCategoryOfArticle(int $iArticleId) : int

If an article is assigned to more than one category take the first category.

Parameters

$iArticleId

int

Returns

intcategory id

Get path of a given category up to a certain level

getCategoryPath($cat_id, $level, $reverse) 

Parameters

$cat_id

$level

$reverse

Get category urlname

getCategoryURLName($cat_id) 

Parameters

$cat_id

Get URL by given category in front_content.php style

getFrontContentUrl(integer $iIdcat, integer $iIdart, boolean $bAbsolute) : string

author Willi Man
access public

Parameters

$iIdcat

integer

$iIdart

integer

$bAbsolute

boolean

return absolute path or not

Returns

stringURL

Get level of a category

getLevel($catid) 

Parameters

$catid

Get parent id of a category

getParent($preid) 

Parameters

$preid

Get root category of a given category

getRoot($cat_id) 

Parameters

$cat_id

Get child categories by given parent category

getSubCategories($iParentCategory) 

Parameters

$iParentCategory

get subtree by a given id

getSubTree(int $idcat_start) : array

copyright four for business AG <www.4fb.de>

Parameters

$idcat_start

int

Id of category

Returns

arrayArray with subtree

Get direct successor of a given category Note: does not work if direct successor (with preid 0) is not visible or not public

getSuccessor($iCategory) 

Parameters

$iCategory

Get URL by given categoryid and/or articleid

getURL(integer $iIdcat, integer $iIdart, $sType, boolean $bAbsolute, $iLevel) : string

author Willi Man
access public

Parameters

$iIdcat

integer

url name to create for

$iIdart

integer

$sType

$bAbsolute

boolean

return absolute path or not

$iLevel

Returns

stringURL

Get urlpath by given category and/or idart and level.

getUrlPath(integer $iIdcat, integer $iIdart, boolean $bAbsolute, $iLevel, $sURL_SUFFIX) : string

The urlpath looks like /Home/Product/Support/ where the directory-like string equals a category path.

requires functions.pathresolver.php
author Marco Jahn (Project www.usa.de)
modified by Willi Man
access public

Parameters

$iIdcat

integer

$iIdart

integer

$bAbsolute

boolean

return absolute path or not

$iLevel

$sURL_SUFFIX

Returns

stringpath information or empty string

Get urlpath by given category and/or selected param and level.

getUrlPathGenParam(integer $iIdcat, integer $iSelectedNumber, boolean $bAbsolute, $iLevel) : string

requires functions.pathresolver.php
author Willi Man
access public

Parameters

$iIdcat

integer

$iSelectedNumber

integer

$bAbsolute

boolean

return absolute path or not

$iLevel

Returns

stringpath information or empty string

Check if child categories of a given parent category exist

hasChildren($iParentCategory) 

Parameters

$iParentCategory

Check if a category has a parent

hasParent($preid) 

Parameters

$preid

Check if a given category has a direct successor

hasSuccessor($iCategory) 

Parameters

$iCategory

Return true if $parentid is parent of $catid

isParent($parentid, $catid) 

Parameters

$parentid

$catid

Check if category is public

isPublic($cat_id) 

Parameters

$cat_id

Check if category is visible

isVisible($cat_id) 

Parameters

$cat_id