stopping sections from being displayed

Basic cascading menu for Actinic 5 onwards.
norman
Site Admin
Posts: 1242
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman » Sat Oct 13, 2007 9:34 am

Dan,

I just noticed that you're using the NorTree workaround that was needed because of a bug in Actinic 8.0.2 and lower. This requires you to load a much bigger JavaScript file than necessary. To correct this go to your Overall Layout and look just below the <body ...> tag for the lump of code.

Code: Select all

<!-- START NorTree Overall Layout patch -->
.
.
.
<!-- END NorTree Overall Layout patch -->
Replace it with:

Code: Select all

<!-- START NorTree Overall Layout patch -->
<!--   start of optional speed up fragment - redefining actiniccore.js's CreateArray to skip creating unused entries -->
<script type='text/javascript'>           
function CreateArray(v12)
	{
	this.length = v12;
	for (var i=1; i <= v12; i++) this[i] = new Object();
	return this;
	}
</script>
<!--   end of optional speed up fragment -->
<script language=JavaScript>var LoggedIn = true;</script>
<Actinic:NOTINB2B>
<script language=JavaScript>var LoggedIn = false;</script>
</Actinic:NOTINB2B>
<actinic:variable name="JavaScriptArray" value="Name Data From All Sections" /> 
<actinic:variable name="JavaScriptArray" value="URL Data From All Sections" /> 
<script type='text/javascript'>
//HV Menu- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more
// Norman Rouxel ( http://www.drillpine.biz (V12) ) amended to work with Actinic netquotevar based section structure 
function Go(){return}
</script>	
<script type="text/javascript" src="nortree_menu_var.js"></script>
<script type="text/javascript" src="nortree_menu_create.js"></script>
<script type="text/javascript" src="nortree_menu_com.js"></script>
<noscript>NorTree (V12) requires JavaScript</noscript>
<!-- END NorTree Overall Layout patch -->
Norman

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

Post by bash » Sat Oct 13, 2007 10:06 am

Hi Norman,

ok, i shall do that tonight when the office is empy.
(I work remotely so have to wait until the pc isnt being used)

What does that code do?

Dan

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

Post by norman » Sat Oct 13, 2007 10:30 am

Dan,

It's the standard NorTree code. Unfortunately early Actinic v8 didn't write the Act_Section_tree_names.js and Act_section_tree_URLs.js files reliably so the kludge was to use the (much bigger) Act_section_tree.js file via this kludge:

Code: Select all

<actinic:variable name="JavaScriptArray" value="All Data From All Sections" />
<script type="text/javascript">
<!-- Actinic GIKA bug workaround
var section_tree_names = section_tree;
var section_tree_URLs = section_tree;
// -->
</script>
Now that Actinic does this properly we can use the more efficient

Code: Select all

<actinic:variable name="JavaScriptArray" value="Name Data From All Sections" /> 
<actinic:variable name="JavaScriptArray" value="URL Data From All Sections" />
That's the only change between what you've got and what I suggest.
Norman

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

Post by bash » Sat Oct 13, 2007 10:42 am

Ah ok,

Thanks

Will change it later on tonight.

Dan

Post Reply