This is a forum where members new and old can come to ask questions and get info and opinions. It is not a place to advertise your business or have other forms of advertising, whether it be in your posts or signature.

All links in the forum will not be indexed by Search Engines and any unapproved forms of advertising or spam will be dealt with accordingly, deleted, and that member's account banned.

Forums

Overview » ASP » DataBase Driven Menu
Reply

DataBase Driven Menu

Andy None
Member



Since: 30 Apr 2009
Posts: 17
Posted 24 Feb 2010 13:46:52

Hi all...
I'm looking for code or an extension to create a database (MS SQL) driven menu for my product list.
I've seen a few about, but none seem to fit the bill.
I have four main product sections with each containing sub and sub/sub sections. Please see below.
Can anyone advise please?

Regards
Andy

Categories
Electrical
- 17th Edition Testers
- - Combined & Multifunction
- - Test Kits
- - Insulation Testers
- - Earth Loop Testers
- - RCD Testers
- - Ground Earth Testers
- - Accessories
- - Calibration Checkboxes
- - Books & DVD's
- General Electrical
- - Electrical Testers & Proving Units
- - Safe Isolation & Safety Kits
Gas
- Combustion Analysers
- - Telegan Analysers
- - Kane Analysers
Tools
- SuperRod
- - Cable Rod Sets
Reapir/Calibration
- 17th Edition Testers
- - 17th Edition Testers - Calibrations
- - 17th Edition Testers - Repairs

Hi all...
I'm looking for code or an extension to create a database (MS SQL) driven menu for my product list.
I've seen a few about, but none seem to fit the bill.
I have four main product sections with each containing sub and sub/sub sections. Please see below.
Can anyone advise please?

Regards
Andy

Categories
Electrical
- 17th Edition Testers
- - Combined & Multifunction
- - Test Kits
- - Insulation Testers
- - Earth Loop Testers
- - RCD Testers
- - Ground Earth Testers
- - Accessories
- - Calibration Checkboxes
- - Books & DVD's
- General Electrical
- - Electrical Testers & Proving Units
- - Safe Isolation & Safety Kits
Gas
- Combustion Analysers
- - Telegan Analysers
- - Kane Analysers
Tools
- SuperRod
- - Cable Rod Sets
Reapir/Calibration
- 17th Edition Testers
- - 17th Edition Testers - Calibrations
- - 17th Edition Testers - Repairs
MX Addict
Wicked Member



Since: 06 Feb 2003
Posts: 245
Replied 24 Feb 2010 14:48:12
Hi Andy,

Maybe is this what you are looking for..

www.dmxzone.com/go?394

www.tom-muck.com/extensions/help/simulatednestedregion/

Or search google for Nested Repeat Regions

Cheers
Andy None
Member



Since: 30 Apr 2009
Posts: 17
Replied 24 Feb 2010 16:21:48
Thanks MX Addict
I now have my menu working dynamically, thank you.
Now i need to create a css or find an extension to format the menu.
Ideally, i'd like to have the four main section headings displayed and when a visitor clicks on a heading, the sub menu displays; and the same for sub sub menus.
So it would work a bit like an accordion effect.

Thanks again
Andy
MX Addict
Wicked Member



Since: 06 Feb 2003
Posts: 245
Replied 24 Feb 2010 16:47:31
Hi Andy,

I did use this for accordion:

berndmatzner.de/jquery/hoveraccordion/

between header

<script type="text/javascript" src="js/jquery.hoveraccordion.js"></script>

	<script type="text/javascript">
		$(document).ready(function(){
		$('#menu').hoverAccordion();
		$('#menu ul:first').show();
		});
	</script>



between body


<ul id="menu">
<li>
	<a href="#">link</a>
	<ul>
		<li><a href="#">project 1</a></li>
		<li><a href="#">project 2</a></li>
		<li><a href="#">project 3</a></li>
		<li><a href="#">project 4</a></li>
	</ul>
</li>
<li>
	<a href="#">link</a>
	<ul>
		<li><a href="#">project 1</a></li>
		<li><a href="#">project 2</a></li>
		<li><a href="#">project 3</a></li>
		<li><a href="#">project 4</a></li>
	</ul>
</li>
</ul>




cheers




Edited by - MX Addict on 24 Feb 2010  16:51:12
MX Addict
Wicked Member



Since: 06 Feb 2003
Posts: 245
Replied 24 Feb 2010 16:54:06
I did created this Repeat Region code and works perfect in combination with jquery accordion. I used the solution mentioned in:

www.dmxzone.com/go?394


<ul id="menu">
<% While ((Repeat1__numRows <> 0) AND (NOT rsNav.EOF)) %>

<li><a href="#"><%=(rsNav.Fields.Item("categorie_nl").Value)%></a>
<ul>
<%FilterParam = (rsNav.Fields.Item("categorieID").Value)
		  rsNavProjects.Filter = "categorieID = " & FilterParam
		  While (NOT rsNavProjects.EOF)%>
<li><a href="link.asp"><%=(rsNavProjects.Fields.Item("project").Value)%></a></li>
		  <%rsNavProjects.MoveNext()
		  Wend%>
	</ul>
</li>
        <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsNav.MoveNext()
Wend
%>
</ul>



cheers


Edited by - MX Addict on 24 Feb 2010  19:15:22
Andy None
Member



Since: 30 Apr 2009
Posts: 17
Replied 28 May 2010 18:06:56
Im still struggling with this :-(
I could really do with a sample page for this too be honest.
I'm pulling the correct data from my database (top level, sub, subsub), but i don't know how to nest all the levels.
Does anyone have sample pages and possibly JQuery/CSS code?

Thanks
Andy

Reply to this topic

Message
Reply
Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency