Seite 1 von 1
					
				expanded menu
				Verfasst: Mi 4. Okt 2006, 06:59
				von quokka
				Hi,
Can't find a solution in these german forums, but in the past the community helped me in English.. Hope someone can help me with this one 
I need an allways expanded haubtmenu, like in the example below.
Any suggestions are highly appreciated!
Thanks,
Quokka

 
			 
			
					
				Re: expanded menu
				Verfasst: Mi 4. Okt 2006, 08:30
				von mvf
				quokka hat geschrieben:Hi,
Can't find a solution in these german forums, but in the past the community helped me in English.. Hope someone can help me with this one 
I need an allways expanded haubtmenu, like in the example below.
Any suggestions are highly appreciated!
Thanks,
Quokka

 
you could abuse e.g. the excellent sitemap by Dodger77, have a look for
vpsitemap
 
			 
			
					
				
				Verfasst: Mi 4. Okt 2006, 08:58
				von crazy
				Hello Quokka,
You can replace the Output Code of the Hauptnavigation with the code.
Use then the 'on templates '. Like 'templates/navfirst_on.html' for Navigation first. 
CU crazy
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname  	:     	Hauptnavigation 2.1
* Author(s)   	:     	Jan Lengowski, Andreas Lindner, 4fb
* Author(V2) 	: 		Christian Bachmann
* Copyright   	:     	Contenido - four for business, Andreas Lindner
* Created     	:     	12.08.2005
* V2			:		04.10.2006
************************************************/
#System properties in use:
#Type: navigation, Name: idcat_homepage
#Contains idcat of tree to be displayed in main navigation
#Includes
#Includes
cInclude("frontend", "includes/functions.navigation.php");
/* Include Template Class */
include_once($cfg["path"]["contenido"] . 'classes/class.template.php');
#If no tree is selected, use client setting
$start_cat = "CMS_VALUE[0]";
/* Template Instance */
$tpl = new Template;
/* Start Output buffer */
ob_start();
	
global $cfg, $client, $lang;
// second db class instance
$db = new DB_Contenido;
$db2 = new DB_Contenido;
$db3 = new DB_Contenido;
$db4 = new DB_Contenido;
$db5 = new DB_Contenido;
$db6 = new DB_Contenido;
//Navigation 1
$sql = "SELECT
			A.idcat,
			C.name,
			C.public,
			C.idcatlang
		FROM
			".$cfg["tab"]["cat_tree"]." AS A,
			".$cfg["tab"]["cat"]." AS B,
			".$cfg["tab"]["cat_lang"]." AS C
		WHERE
			A.idcat     = B.idcat   AND
			B.idcat     = C.idcat   AND
			B.idclient  = '$client' AND
			C.idlang    = '$lang'   AND
			C.visible   = '1'       AND
			B.parentid  = '".$start_cat."'
		ORDER
			BY A.idtree";
$db->query($sql);	
while ($db->next_record()) {	
	/* Check for external redirects... */
	$sql = "SELECT
				a.external_redirect AS ext,
				a.idartlang AS idartlang
			FROM
				".$cfg["tab"]["art_lang"]." AS a,
				".$cfg["tab"]["cat_art"]." AS b,
				".$cfg["tab"]["cat"]." AS c
			WHERE
				b.idcat     = '".$db->f("idcat")."' AND
				c.idclient  = '".$client."' AND
				c.idcat     = b.idcat AND
				a.idart     = b.idart AND
				a.idlang    = '".$lang."'";
	
	$db2->query($sql);
	$flag = false;
	while ($db2->next_record()&&!$flag) {
		if (isStartArticle($db2->f("idartlang"), $db->f("idcat"), $lang))
		{
			$flag = true;
			$target = ( $db2->f("ext") == 0 ) ? '_self' : '_blank';
			/* 1. Navigations Ebene */
			$tpl->reset();
			$tpl->set('d', 'NAME', $db->f("name"));
			$tpl->set('d', 'TARGET', $target);
			$tpl->set('d', 'HREF',  $sess->url('front_content.php?idcat='.$db->f("idcat")));
			$tpl->next();
			$tpl->generate('templates/navfirst_on.html');
		}
	}
	
	//Navigation 2
	$sql = "SELECT
				A.idcat,
				C.name,
				C.public,
				C.idcatlang
			FROM
				".$cfg["tab"]["cat_tree"]." AS A,
				".$cfg["tab"]["cat"]." AS B,
				".$cfg["tab"]["cat_lang"]." AS C
			WHERE
				A.idcat     = B.idcat   AND
				B.idcat     = C.idcat   AND
				B.idclient  = '$client' AND
				C.idlang    = '$lang'   AND
				C.visible   = '1'       AND
				B.parentid  = '".$db->f("idcat")."'
			ORDER
				BY A.idtree";
	
		  $db3->query($sql);
	
	  while ($db3->next_record()) {	
		/* Check for external redirects... */
		$sql = "SELECT
					a.external_redirect AS ext,
					a.idartlang AS idartlang
				FROM
					".$cfg["tab"]["art_lang"]." AS a,
					".$cfg["tab"]["cat_art"]." AS b,
					".$cfg["tab"]["cat"]." AS c
				WHERE
					b.idcat     = '".$db3->f("idcat")."' AND
					c.idclient  = '".$client."' AND
					c.idcat     = b.idcat AND
					a.idart     = b.idart AND
					a.idlang    = '".$lang."'";
		$db4->query($sql);
		$flag = false;
		while ($db4->next_record()&&!$flag) {
			if (isStartArticle($db4->f("idartlang"), $db3->f("idcat"), $lang))
			{
				$flag = true;
				$target = ( $db4->f("ext") == 0 ) ? '_self' : '_blank';
			
				$tpl->reset();
				$tpl->set('d', 'NAME', $db3->f("name"));
				$tpl->set('d', 'TARGET', $target);
				$tpl->set('d', 'HREF',  $sess->url('front_content.php?idcat='.$db3->f("idcat")));
				$tpl->next();
				$tpl->generate('templates/navsecond_on.html');
			}
		}	
		
		//Navigation 3
		$sql = "SELECT
					A.idcat,
					C.name,
					C.public,
					C.idcatlang
				FROM
					".$cfg["tab"]["cat_tree"]." AS A,
					".$cfg["tab"]["cat"]." AS B,
					".$cfg["tab"]["cat_lang"]." AS C
				WHERE
					A.idcat     = B.idcat   AND
					B.idcat     = C.idcat   AND
					B.idclient  = '$client' AND
					C.idlang    = '$lang'   AND
					C.visible   = '1'       AND
					B.parentid  = '".$db3->f("idcat")."'
				ORDER
					BY A.idtree";
		
			  $db5->query($sql);
		
		  while ($db5->next_record()) {	
			/* Check for external redirects... */
			$sql = "SELECT
						a.external_redirect AS ext,
						a.idartlang AS idartlang
					FROM
						".$cfg["tab"]["art_lang"]." AS a,
						".$cfg["tab"]["cat_art"]." AS b,
						".$cfg["tab"]["cat"]." AS c
					WHERE
						b.idcat     = '".$db5->f("idcat")."' AND
						c.idclient  = '".$client."' AND
						c.idcat     = b.idcat AND
						a.idart     = b.idart AND
						a.idlang    = '".$lang."'";
	
			$db6->query($sql);
			$flag = false;
			while ($db6->next_record()&&!$flag) {
				if (isStartArticle($db6->f("idartlang"), $db5->f("idcat"), $lang))
				{
					$flag = true;
					$target = ( $db6->f("ext") == 0 ) ? '_self' : '_blank';
	
					
					/* 3. Navigations Ebene */
					$tpl->reset();
					$tpl->set('d', 'NAME',  $db5->f("name"));
					$tpl->set('d', 'TARGET', $target);
					$tpl->set('d', 'HREF',  $sess->url('front_content.php?idcat='.$db5->f("idcat")));
					$tpl->next();
					$tpl->generate('templates/navthird_on.html');
					
				}
			}
		}					
	}
}
/* Read out buffer */
$html = ob_get_contents();
/* Clean buffer */
ob_end_clean();
/* Output buffer-contents */
echo $html;     
?>
 
			 
			
					
				Thanks
				Verfasst: Mi 4. Okt 2006, 11:50
				von quokka
				YES...
Thanks again Guido, seems you know an answer on every question 
 
Thanks for crazy too....
I tried the vpsitemap and this is EXACTLY what I need.
Thanks!
Quokka
 
			 
			
					
				Re: Thanks
				Verfasst: Mi 4. Okt 2006, 12:33
				von mvf
				quokka hat geschrieben:YES...
Thanks again Guido, seems you know an answer on every question 
 
Thanks for crazy too....
I tried the vpsitemap and this is EXACTLY what I need.
Thanks!
Quokka
 
yr wlcm, but the honor belongs to Dodger77 for the sitemap, not to me 
by the way, be aware that there have been some issues with protected cats in the sitemap, have a look through the appropriate post and search for 'auth' or 'perm' it's just 2-3 lines added to make the protected cats only visible if a user is loggend in and hast the rights
 
			 
			
					
				Re: Thanks
				Verfasst: Mi 4. Okt 2006, 12:39
				von Dodger77
				mvf hat geschrieben:by the way, be aware that there have been some issues with protected cats in the sitemap, have a look through the appropriate post and search for 'auth' or 'perm' it's just 2-3 lines added to make the protected cats only visible if a user is loggend in and hast the rights
New version, less issues: 
 
http://www.contenido.org/forum/viewtopi ... =vpsitemap 
			 
			
					
				Re: Thanks
				Verfasst: Mi 4. Okt 2006, 13:04
				von mvf
				
super 

 ich hab mal eine von dir so angepasst wie ichs gern hätte und die rennt nun eben seit ewigkeiten. muss aber mal direkt gucken
 
			 
			
					
				Danke!!
				Verfasst: Do 5. Okt 2006, 15:36
				von quokka
				Thanks! you guys rule   
 
http://www.quokka.nl/cms
Just like i wanted!! Great contrib....
Whooooooaaaaaahhhh 
  
  
 ...
I love contenido and the community....
One more thing (if you don't mind)
I would like to have a dropdown menu (from select) that shows all articles in a particular category.. something like a dropdown artikelliste exists??
Can't find it in the forums.. What is it called in german?
Thanks again!
Quokka
 
			 
			
					
				
				Verfasst: Do 5. Okt 2006, 15:48
				von HerrB
				Usually this is an article list ("Artikelliste") but instead of echoing the article template and provide a link you have to generate an HTML select box item.
I haven't seen such a module. But it is not that difficult, to generate this module using an article list module as base. Bigger problem is, how the user should be redirected to the page - you can use Javascript and an onchange event (-> problem, if user has JS turned off) or you can name the selectbox "idart" and provide a submit button.
Regards,
HerrB
			 
			
					
				Ok..I'll give it a try ;-)
				Verfasst: Do 5. Okt 2006, 17:04
				von quokka
				Thanks again,
I'll try to play around with the artikleliste!
Nice day..
Quokka
			 
			
					
				Found something
				Verfasst: Do 5. Okt 2006, 17:22
				von quokka
				The search for artikelliste dropdown helped me...
found this mod: 
http://contenido.org/forum/viewtopic.php?p=89103
It seems to work in latest contenido version, except one thing..
after menu my next module (HTML1), this is displayed:
/* ?>
http://quokka.nl/cms/front_content.php? ... t=14&m=&s=
Any suggestions??
Thanks in advance...
Quokka
 
			 
			
					
				fixed
				Verfasst: Do 5. Okt 2006, 20:47
				von quokka
				My mistake..
other mod had wrong comment in it...
thanks