expanded menu

Gesperrt
quokka
Beiträge: 48
Registriert: Sa 12. Mär 2005, 00:07
Wohnort: Tilburg - The Netherlands
Kontaktdaten:

expanded menu

Beitrag von quokka » Mi 4. Okt 2006, 06:59

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

Bild

mvf
Beiträge: 1758
Registriert: Mo 1. Aug 2005, 00:35
Wohnort: in der schönen Hallertau, mitten im Hopfen
Kontaktdaten:

Re: expanded menu

Beitrag von mvf » Mi 4. Okt 2006, 08:30

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

Bild
you could abuse e.g. the excellent sitemap by Dodger77, have a look for

vpsitemap
Grüsse, Guido

"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
Mostly Harmless - Douglas Adams

crazy
Beiträge: 62
Registriert: Di 10. Feb 2004, 10:39
Kontaktdaten:

Beitrag von crazy » Mi 4. Okt 2006, 08:58

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;     

?>

quokka
Beiträge: 48
Registriert: Sa 12. Mär 2005, 00:07
Wohnort: Tilburg - The Netherlands
Kontaktdaten:

Thanks

Beitrag von quokka » Mi 4. Okt 2006, 11:50

YES...
Thanks again Guido, seems you know an answer on every question :o
Thanks for crazy too....

I tried the vpsitemap and this is EXACTLY what I need.
Thanks!
Quokka

mvf
Beiträge: 1758
Registriert: Mo 1. Aug 2005, 00:35
Wohnort: in der schönen Hallertau, mitten im Hopfen
Kontaktdaten:

Re: Thanks

Beitrag von mvf » Mi 4. Okt 2006, 12:33

quokka hat geschrieben:YES...
Thanks again Guido, seems you know an answer on every question :o
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
Grüsse, Guido

"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
Mostly Harmless - Douglas Adams

Dodger77
Beiträge: 3626
Registriert: Di 12. Okt 2004, 20:00
Wohnort: Voerde (Niederrhein)
Kontaktdaten:

Re: Thanks

Beitrag von Dodger77 » Mi 4. Okt 2006, 12:39

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: :wink:

http://www.contenido.org/forum/viewtopi ... =vpsitemap

mvf
Beiträge: 1758
Registriert: Mo 1. Aug 2005, 00:35
Wohnort: in der schönen Hallertau, mitten im Hopfen
Kontaktdaten:

Re: Thanks

Beitrag von mvf » Mi 4. Okt 2006, 13:04

Dodger77 hat geschrieben: New version, less issues: :wink:

http://www.contenido.org/forum/viewtopi ... =vpsitemap
super :D 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
Grüsse, Guido

"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
Mostly Harmless - Douglas Adams

quokka
Beiträge: 48
Registriert: Sa 12. Mär 2005, 00:07
Wohnort: Tilburg - The Netherlands
Kontaktdaten:

Danke!!

Beitrag von quokka » Do 5. Okt 2006, 15:36

Thanks! you guys rule :D

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

HerrB
Beiträge: 6935
Registriert: Do 22. Mai 2003, 12:44
Wohnort: Berlin
Kontaktdaten:

Beitrag von HerrB » Do 5. Okt 2006, 15:48

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
Bitte keine unaufgeforderten PMs oder E-Mails -> use da Forum!

Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net

quokka
Beiträge: 48
Registriert: Sa 12. Mär 2005, 00:07
Wohnort: Tilburg - The Netherlands
Kontaktdaten:

Ok..I'll give it a try ;-)

Beitrag von quokka » Do 5. Okt 2006, 17:04

Thanks again,
I'll try to play around with the artikleliste!
Nice day..
Quokka

quokka
Beiträge: 48
Registriert: Sa 12. Mär 2005, 00:07
Wohnort: Tilburg - The Netherlands
Kontaktdaten:

Found something

Beitrag von quokka » Do 5. Okt 2006, 17:22

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

quokka
Beiträge: 48
Registriert: Sa 12. Mär 2005, 00:07
Wohnort: Tilburg - The Netherlands
Kontaktdaten:

fixed

Beitrag von quokka » Do 5. Okt 2006, 20:47

My mistake..
other mod had wrong comment in it...
thanks

Gesperrt