Page 1 of 2

stopping sections from being displayed

Posted: Wed Sep 20, 2006 1:49 pm
by andrewpk
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

Posted: Wed Sep 20, 2006 5:57 pm
by norman
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.

Posted: Thu Sep 21, 2006 10:04 am
by andrewpk
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,

Posted: Thu Sep 21, 2006 11:37 am
by norman
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.

Posted: Thu Sep 21, 2006 12:34 pm
by andrewpk
Hmm, not looking for to much customisation, i kind of hopped this was something simple

Nevermind

Posted: Thu Sep 21, 2006 1:23 pm
by norman
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.

Posted: Thu Oct 11, 2007 3:52 pm
by bash
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

Posted: Thu Oct 11, 2007 4:02 pm
by norman
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.,

Posted: Thu Oct 11, 2007 4:09 pm
by bash
ok, it would be one section and everything underneath it.

Is this hard to do?

How much would it cost?

Thanks

Dan

Posted: Thu Oct 11, 2007 5:33 pm
by norman
Is it a top level section or a lower level one?

Posted: Thu Oct 11, 2007 6:51 pm
by bash
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.

Posted: Thu Oct 11, 2007 8:35 pm
by norman
I think I'll need a URL to fully see what I can do.

Posted: Fri Oct 12, 2007 10:22 pm
by bash
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.

Posted: Fri Oct 12, 2007 10:59 pm
by norman
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.

Posted: Fri Oct 12, 2007 11:48 pm
by bash
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