File: /include/inc_front/front.func.inc.php
Line: 511
function name: get_struct_data
desc:We will add the "acat_alias" to the struct wich is used for building the menu. I did this at the end of each field-list. You can copy the complete function from here
Code: Select all
function get_struct_data ($dbcon, $root_name="Home", $root_info="") {
//returns the complete active and public struct data as array
//so it is reusable by many menu functions -> lower db access
$data[0] = array( "acat_id" => 0,
"acat_name" => $root_name,
"acat_info" => $root_info,
"acat_struct" => 0,
"acat_sort" => 0,
"acat_hidden" => 0,
"acat_regonly" => 0,
"acat_ssl" => 0,
"acat_template" => 0 ,
"acat_alias" => 0
);
$sql = "SELECT * FROM ".DB_PREPEND."phpwcms_articlecat WHERE ".
"acat_aktiv=1 AND acat_public=1 AND acat_trash=0 ORDER BY acat_struct, acat_sort;";
if($result = mysql_query($sql, $dbcon)) {
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$data[$row["acat_id"]] = array( "acat_id" => $row["acat_id"],
"acat_name" => $row["acat_name"],
"acat_info" => $row["acat_info"],
"acat_struct" => $row["acat_struct"],
"acat_sort" => $row["acat_sort"],
"acat_hidden" => $row["acat_hidden"],
"acat_regonly" => $row["acat_regonly"],
"acat_ssl" => $row["acat_ssl"],
"acat_template" => $row["acat_template"],
"acat_alias" => $row["acat_alias"]
);
}
mysql_free_result($result);
}
return (sizeof($data)) ? $data : array();
}
File: /include/inc_front/front.func.inc.php
Line: 669
function name: build_levels
desc:In line 705 we will change the var $link to prepare for using aliase. You can copy this line from here. I left the original untouched to have the chanche to go back
Code: Select all
// $link = $link_to."?id=".$key.",0,0,1,0,0";
$link = $link_to."?".$struct[$key]['acat_alias'];
This hacks works for the widly used {NAV_TABLE_COLUMN} replacement tag, but should be easily adopted.
Have fun !!!
[ p i x e l p e t e r ] (R)