CSS/List based version of NAV_TABLE_COLUMN
-
- Posts: 4
- Joined: Fri 9. Jul 2004, 14:29
Re: CSS/List based version of NAV_TABLE_COLUMN
I don't know why but I get regexp error when I put this into the file... and can't seem to be able to use the new cool table... which is annoying... a bit...david wrote:Hello. I just started using phpwcms and am trying to make it completely CSS based (XHTML-Strict). I implemented my own <ul> version of the NAV_COLUMN_TABLE by simply editing the functions a bit and renaming them. NAV_LIST_CURRENT and NAV_LIST_TOP just didn't do it for me. I hope that someone can use this.
DavidCode: Select all
// ------------------------------------------------------------- // <ul>-list based Navigation table if( ! ( strpos($content["all"],'{NAV_LIST_ALL')==false ) ) { $content["all"] = str_replace('{NAV_LIST_ALL}','{NAV_LIST_ALL:0}',$content["all"]); $replace = 'css_list_all($content["struct"],intval($content["cat_id"]),"$1",$template_default["nav_table_struct"]);'; $content["all"] = preg_replace('/\{NAV_LIST_ALL:(\d+)\}/e', $replace, $content["all"]); }
here is an example of how this TAG works
http://howard-lee-sloan.com/
please click on Gallery to see the Child Menu...
TriP
http://howard-lee-sloan.com/
please click on Gallery to see the Child Menu...
TriP
Hi there
could you explain how you make the current link active ??
ie how did you set the css for the active link
Please give an example of how you did this
thanks
TriP
could you explain how you make the current link active ??
ie how did you set the css for the active link
Code: Select all
<div class="MenuItem_lvl_2" id="activeSection"><a href="index.php?" title="active link">My active link</a></div>
thanks
TriP
Great work! ...but...
Hi, great work!
But... I look two 'bugs'...
1. The redirected structure levels don't redirect...
2. The structure levels set to NOT visible, appear anyway in the menu... ( I say "acat_aktiv" == 0 )
I'll try to fixit....
But... I look two 'bugs'...
1. The redirected structure levels don't redirect...
2. The structure levels set to NOT visible, appear anyway in the menu... ( I say "acat_aktiv" == 0 )
I'll try to fixit....
The redirected now redirect
May be not an Elegant solution.... but now the redirections work!
Code: Select all
function build_levels_list ($struct, $level, $temp_tree, $act_cat_id, $nav_table_struct, $count, $div, $link_to) {
// this returns the level structure based on given arrays
// it is special for browsing from root levels
$depth = sizeof($temp_tree)-$div; $count++; $depth2 = $depth-$count+2;
$temp_menu = "";
foreach($struct as $key => $value) {
if($_SESSION["frontend_user_in"] && $struct[$key]["acat_regonly"]) $struct[$key]["acat_regonly"] = 0;
if($struct[$key]["acat_struct"] == $level && $key && !$struct[$key]["acat_hidden"] && !$struct[$key]["acat_regonly"]) {
$link_image_id = "linkid".randpassword(6);
$link_name_id = ' name="'.$link_image_id.'" id="'.$link_image_id.'"';
if(!$struct[$key]["acat_redirect"]){
$link = $link_to."?";
$link .= ($struct[$key]["acat_alias"]) ? html_specialchars($struct[$key]["acat_alias"]) : 'id='.$key.',0,0,1,0,0';
}
else{
$redirect = get_redirect_link($GLOBALS['content']['struct'][$key]["acat_redirect"], ' ', '');
$link = $redirect['link'];
}
if($temp_tree[$key]) {
if($act_cat_id == $key) {
$temp_menu .= "<div class=\"MenuItem_lvl_".$count."\" id=\"activeSection\"><a href=\"".$link."\" ";
if($struct[$key]["acat_redirect"])$temp_menu .= "target = \"".$redirect['target']."\" ";
$temp_menu .= "title=\"".html_specialchars($struct[$key]["acat_name"])."\">".html_specialchars($struct[$key]["acat_name"])."</a></div>\n";
} else {
$temp_menu .= "<div class=\"MenuItem_lvl_".$count."\"><a href=\"".$link."\" ";
if($struct[$key]["acat_redirect"])$temp_menu .= "target = \"".$redirect['target']."\" ";
$temp_menu .= "title=\"".html_specialchars($struct[$key]["acat_name"])."\">".html_specialchars($struct[$key]["acat_name"])."</a></div>\n";
}
$temp_menu .= build_levels_list ($struct, $key, $temp_tree, $act_cat_id, $nav_table_struct, $count, $div, $link_to);
} else {
$temp_menu .= "<div class=\"MenuItem_lvl_".$count."\"><a href=\"".$link."\" ";
if($struct[$key]["acat_redirect"])$temp_menu .= "target = \"".$redirect['target']."\" ";
$temp_menu .= "title=\"".html_specialchars($struct[$key]["acat_name"])."\">".html_specialchars($struct[$key]["acat_name"])."</a></div>\n";
}
}
}
return $temp_menu;
}
-
- Posts: 2
- Joined: Tue 31. May 2005, 17:26
hmm...
I don't see how I can make phpwcms xhtml strict / get rid of the tables. In all the examples you've posted, there are also still tables in there...
It's really frustrating that there's no good xhtml strict cms (afaik) with all the possibilities and simplicity of design creation it would offer...
Please correct me if I'm wrong.
It's really frustrating that there's no good xhtml strict cms (afaik) with all the possibilities and simplicity of design creation it would offer...
Please correct me if I'm wrong.
-
- Posts: 2
- Joined: Tue 31. May 2005, 17:26
- cyppher.nl
- Posts: 138
- Joined: Wed 19. May 2004, 18:38
- Location: Hilversum, Netherlands
Hi
I want to use the RepTag {NAV_LIST_ALL} to build up my CSS menu on http://ctmweb.nl.server1.firstfind.nl/kidstop20.nl/
My phpWCMS version is 1.2.3-DEV.
I've added the file reptag_css_nav_list_all.php in the frontend_render folder as described in --...--/index.php/topic,59.msg110.html#msg110 .
My ftp-settings are correct (chmod) I think.
However, when I added this reptag in the used template in the backend, nothing happens in the front-end. The tag is visible as {NAV_LIST_ALL} instead of a menu.
I've searched the frontend.css for the css styles, but couldn't find them too.
EDIT:
The rep.tag seems to work now.
I'm actually wondering how to rewrite the code/css to have each menu-item having its own background and a:hover image.
Any hints?
I want to use the RepTag {NAV_LIST_ALL} to build up my CSS menu on http://ctmweb.nl.server1.firstfind.nl/kidstop20.nl/
My phpWCMS version is 1.2.3-DEV.
I've added the file reptag_css_nav_list_all.php in the frontend_render folder as described in --...--/index.php/topic,59.msg110.html#msg110 .
My ftp-settings are correct (chmod) I think.
However, when I added this reptag in the used template in the backend, nothing happens in the front-end. The tag is visible as {NAV_LIST_ALL} instead of a menu.
I've searched the frontend.css for the css styles, but couldn't find them too.
EDIT:
The rep.tag seems to work now.
I'm actually wondering how to rewrite the code/css to have each menu-item having its own background and a:hover image.
Any hints?
How do you do? And how do you do your wife?