Need advice on technique

General ShopSite user discussion

Need advice on technique

Postby VinceS » Wed Feb 17, 2010 9:14 am

I've created a multi-level side bar menu that is generated from within my custom Page and Product templates using CSS includes. It works great and I'm about to go live with it, but I just had the realization that whenever I make a change to this menu I'll have to regenerate my entire site.

My question is - is there an alternative to generating the menu from within the Page and Product templates.

You can see the menu here:

http://ahoydemo.ahoycaptain.com/shop/testindex.html

PS If anyone sees/finds an error or something off with it PLEASE let me know.
Thanks Vince
vince@ahoycaptain.com
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm

Postby Jim » Thu Feb 18, 2010 8:35 am

Since pages generated by ShopSite are static any time you make changes that affect the whole site, such as your navigation, will require a publish of the site. But even in the largest store I have ever seen this doesn't take a lot of time.

Static pages have several advantages over dynamically generated pages, they are more search engine friendly and they reduce server load when displaying a page.

It might be possible to use something like php to generate the menu on the fly when the page is displayed but you would need to know how to program in php and have a server that has php installed in order to do that.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby VinceS » Thu Feb 18, 2010 10:08 am

Thanks Jim
Much appreciated that you took the time to reply. I was just checking to be sure I wasn't going in a wrong direction. One of the reasons I went with the CSS menu is because I can (and plan) to add a significant amount of new products that will require frequent menu additions.

Thanks again
Vince
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm

Postby Bsummerlin » Mon Mar 01, 2010 1:39 pm

Any chance you could post some more on how you did sub menus on specific pages? I've got my hard coded menu setup in css already with this structure:
<div id="cats">
<ul>
<li><a href="#">Level1 Link1</a></li>
<li><a href="#">Level1 Link2</a></li>
<li><a href="#">Level1 Link3</a>
<ul>
<li><a href="#">Level2 Link1</a></li>
<li><a href="#">Level2 Link2</a></li>
<li><a href="#">Level2 Link3</a></li>
</ul>
</li>
<li><a href="#">Level1 Link4</a></li>
<li><a href="#">Level1 Link5</a></li>
<li><a href="#">Level1 Link6</a></li>
</ul>

I'm currently digging through the forums, support pages, and example templates looking to find a solution now for what I would think should be fairly straight forward. I know you can declare variables in SS, and am familiar with php (my current site is written in it and I've overhauled it completely). Am looking forward to utilizing shop site as long as I can get over some of these minor hurdles.

Thanks!
Bsummerlin
 
Posts: 18
Joined: Mon Mar 01, 2010 1:27 pm
Location: Louisiana

Postby VinceS » Mon Mar 01, 2010 3:13 pm

Your approach is spot on but you need to kick it up with a little java applet. I used a bit of freeware that you can find here.

http://www.dynamicdrive.com/style/cssli ... -vertical/

With some tinkering you can get some pretty nice results. I'm very pleased with my new menu. It's easily modified and simple to implement. I used a table structure for the Page and Products layout and created everything as includes ie the Boating Menu, Home & Garden Menu and Outdoor Menu are all separate Includes that can be turned on and off from within a parent include seen here.

<!-- Begin AC_Sidebar -->
<div class="suckerdiv">
<ul id="suckertree1">
[-- INCLUDE AC_Boating_Menu PROCESS --]
[-- INCLUDE AC_HomeGarden_Menu PROCESS --]
[-- INCLUDE AC_Outdoors_Menu PROCESS --]
</ul>
</div>
<!-- End AC_Sidebar -->

Good luck.
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 73 guests

cron