stopping sections from being displayed

Basic cascading menu for Actinic 5 onwards.
andrewpk
Posts: 3
Joined: Wed Sep 20, 2006 1:42 pm

stopping sections from being displayed

Post by andrewpk » Wed Sep 20, 2006 1:49 pm

Hi, I have my pages in a One product per page layout, with a section list page (using the 3 col layout) one level up

What i want to know is, is there a way of telling nortree to stop at the section level, so it does not display the link to the INDIVIDUAL product but does have the link to the sections

ie if my layout was

---guitars---
\guitar1
\guitar2
\Guitar3

---Bass-----
\Bass1
\Bass2
\Bass3

I would want it to show the Guitars and the Bass Section but not the final sections

Thanks for any Info

Andy

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman » Wed Sep 20, 2006 5:57 pm

On the NorTree program main menu set Max Depth to 2. That should do it. Adjust that number if you want more or less levels displayed.
Norman

andrewpk
Posts: 3
Joined: Wed Sep 20, 2006 1:42 pm

Post by andrewpk » Thu Sep 21, 2006 10:04 am

the only problem with that is that some of our product groups go to 3 or even 4 levels deep, and some only go to 1 or 2,
so putting max depth to 2 would mess up the other sections,

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman » Thu Sep 21, 2006 11:37 am

You want the menu to not include a page if that page doesn't contain any sub-pages. This is fiendishly difficult. I've spent 2 hours on this without success.

These are Donationware patches and the typical donations (have you made one?) don't cover such extensive customisation. You'll have to contact me for a quote if you want me to continue.
Norman

andrewpk
Posts: 3
Joined: Wed Sep 20, 2006 1:42 pm

Post by andrewpk » Thu Sep 21, 2006 12:34 pm

Hmm, not looking for to much customisation, i kind of hopped this was something simple

Nevermind

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman » Thu Sep 21, 2006 1:23 pm

I'm afraid it isn't simple. NorTree is a very complex add-on and thus difficult to amend. If it was easy you'd have the mod' by now. I had to give up as I can't be realistically expected to provide a huge amount of my time on one site.

However you have the entire code that needs changing. Look in nortree_menu_create.js (in your Site folder) as this is the routine that needs changing.

Alternatively you could write some code that strips out the final levels from Act_section_tree_names.js and Act_section_tree_URL.js, before presenting them to the NorTree code. You'd need to do this at the very top of nortree_menu_create.js as this would redifine these structures before the main nortree_menu_create code runs.
Norman

bash
Posts: 14
Joined: Wed Nov 08, 2006 12:27 am

Post by bash » Thu Oct 11, 2007 3:52 pm

This seems to be a similar thread to add to...

Norman...
How much would you charge to add a function of being able to "deselect" sections from being added to the list?

For example:
A checkbox called "include in tree" in the section properties in actinic decides whether or not the section is included in the tree when it is created.

Is that possible?

Dan

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman » Thu Oct 11, 2007 4:02 pm

Afraid not. NorTree uses the Actinic generated Act_section_tree_names.js and Act_section_tree_URLs.js JavaScript files. These files aren't created via any Layouts so we have no way of adding / romoving any code to / from them.

What might be possible would be to omit a few specific sections (and their sub-sections) by putting their names into a skip-list within the NorTree code. This would be site specific and would require set-up by hand.,
Norman

bash
Posts: 14
Joined: Wed Nov 08, 2006 12:27 am

Post by bash » Thu Oct 11, 2007 4:09 pm

ok, it would be one section and everything underneath it.

Is this hard to do?

How much would it cost?

Thanks

Dan

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman » Thu Oct 11, 2007 5:33 pm

Is it a top level section or a lower level one?
Norman

bash
Posts: 14
Joined: Wed Nov 08, 2006 12:27 am

Post by bash » Thu Oct 11, 2007 6:51 pm

its a lower level one

>Surfboards
>Boards In Stock
>Board Type1*
>Board1
>Board2 (etc)
>Board Type2*
>(etc)

I want to be able to hide all links under "Boards In Stock" but still be able to access the boards in stock page.

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman » Thu Oct 11, 2007 8:35 pm

I think I'll need a URL to fully see what I can do.
Norman

bash
Posts: 14
Joined: Wed Nov 08, 2006 12:27 am

Post by bash » Fri Oct 12, 2007 10:22 pm

https://www.nineplus.com/acatalog/

If you go to "surfboards" there is a subcatagory of "boards in stock" USUALLY there is subcatagories under that of the board model and then under them the different boards (their own section) and then the product.
(One section per board)

I want to be able to hide everything under "Boards In Stock" but still be able to click on boards in stock to take you to its section page.

norman
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman » Fri Oct 12, 2007 10:59 pm

It can be done. The solution isn't too difficult to implement but it took some time to work out. Luckily I need a new Shortie just like the one on https://www.nineplus.com/acatalog/short_john.html - in XL - my address on http://www.drillpine.biz.

Here's what to do. Edit nortree_menu_create.js in your Site folder.

Look for the fragments

Code: Select all

if ((pItem[i].pChild) && (ThisLevel < MaxDepth))
There are two occurrences - replace both with

Code: Select all

if ((pItem[i].pChild) && (ThisLevel < MaxDepth) && (pItem[i].sName != 'boards in stock'))
Leave the rest of these lines intact. We're only patching the start of the line.
Norman

bash
Posts: 14
Joined: Wed Nov 08, 2006 12:27 am

Post by bash » Fri Oct 12, 2007 11:48 pm

Thanks Norman

Tested and works amazingly.

I will speak to Rich when he gets back and i am in the office about the short john.

Thanks again

Dan

Post Reply