CSS/List based version of NAV_TABLE_COLUMN

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
aCCuReRaS
Posts: 17
Joined: Wed 9. Jun 2004, 22:56

Post by aCCuReRaS »

I also edited the original with my own code.

you can find an example of my site on: http://www.esol.be (site is in dutch)
Last edited by aCCuReRaS on Mon 15. Nov 2004, 22:55, edited 1 time in total.
hetgasbedrijf
Posts: 4
Joined: Fri 9. Jul 2004, 14:29

Post by hetgasbedrijf »

Thanks / Dankje voor de hint aCCuReRaS, Works great / Werkt nu perfect.


Gr Steven
psych0
Posts: 4
Joined: Sun 24. Oct 2004, 01:37

Re: CSS/List based version of NAV_TABLE_COLUMN

Post by psych0 »

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.

Code: 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"]);
}
David
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... ;)
bazil749
Posts: 1
Joined: Mon 25. Oct 2004, 21:26

Post by bazil749 »

Would anyone know what I would have to do to get this NAV to include a link to my Home site structure.

Because right now, it has all the structures under home.
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

here is an example of how this TAG works
http://howard-lee-sloan.com/

please click on Gallery to see the Child Menu...

TriP
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

Hi there
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>
Please give an example of how you did this
thanks
TriP
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

Great script, works wonders by the way....
Minime
Posts: 19
Joined: Fri 11. Mar 2005, 18:07

Post by Minime »

never mind already fixed
AM
Posts: 19
Joined: Sun 24. Oct 2004, 18:33

Great work! ...but...

Post by AM »

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.... :?
AM
Posts: 19
Joined: Sun 24. Oct 2004, 18:33

The redirected now redirect

Post by AM »

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; 
} 
coCoKNIght
Posts: 2
Joined: Tue 31. May 2005, 17:26

hmm...

Post by coCoKNIght »

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.
brans

Post by brans »

I may be wrong but I think that http://www.redaxo.de is xthml strict.
coCoKNIght
Posts: 2
Joined: Tue 31. May 2005, 17:26

Post by coCoKNIght »

Nah, it's not, but I just remembered that Wordpress is xhtml strict.
And i've just seen that aCCuReRas page looks doesn't have tables...

aCCuReRas: Could you tell us what settings you've made in the phpwcms admin section? tnx!
Fexxx
Posts: 36
Joined: Fri 10. Jun 2005, 15:20

Post by Fexxx »

It seems like the sitemap is not working with this modification?
can anybody help ? i take the code form jamba.

EDIT: Oh sorry, the sitemap wasn´t enabled ;)
User avatar
cyppher.nl
Posts: 138
Joined: Wed 19. May 2004, 18:38
Location: Hilversum, Netherlands

Post by cyppher.nl »

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?
How do you do? And how do you do your wife?
Post Reply