LOL he is Jo
Announcement
Collapse
No announcement yet.
freebie: popout section aware nav.
Collapse
X
-
ok i am trying to install this....
I took the php code from post #1 and added to actinic_main.php
i took the block code from post #12 and placed it in layout where i want the nav to show
I'll do the css later.
but on upload i get "Fatal error: Call to undefined function: makenav() in main on line 1" wherethe nav should be.
site is visible at testing dot surf-wax dot co dot uk
Comment
-
*gets very mad with 'quick reply' button STILL not working*
I never managed to work out why this wouldn't work for me. It seemed, at the time, as if I was the only person who had a problem with it. I couldn't even get it to work on a brand new, default site.
Not looked at it lately though (although I was planning to soon-ish) but it is kinda reassuring to know it's not just me!Tracey
Comment
-
Originally posted by gabrielcrowe View Post
Assuming use, thus:
HTML Code:<div class="navcontainerment"> <actinic:block php="true" > MakeNav(0,1,0,0); </actinic:block> </div>
and how does it work with
After some people had problems making this work due to error it generates, I hashed this together:
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Brochure%27" > <actinic:block php="true" > MakeNav(0,2,0,0); </actinic:block></actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Checkout%20Page%200%27" > </actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Checkout%20Page%201%27" > </actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Checkout%20Page%202%27" > </actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Shopping%20Cart%27" > <actinic:block php="true" > MakeNav(0,1,0,0); </actinic:block></actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Add%20To%20Cart%20Confirmation%27" > <actinic:block php="true" > MakeNav(0,1,0,0); </actinic:block></actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Receipt%27" > </actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Search%27" > <actinic:block php="true" > MakeNav(0,2,0,0); </actinic:block></actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Search%20Results%27" > <actinic:block php="true" > MakeNav(0,1,0,0); </actinic:block></actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Bounce%20Page%27" > <actinic:block php="true" > MakeNav(0,1,0,0); </actinic:block></actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Site%20Map%27" > <actinic:block php="true" > MakeNav(0,1,0,0); </actinic:block></actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Terms%20And%20Conditions%27" > <actinic:block php="true" > MakeNav(0,1,0,0); </actinic:block></actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Section%27">
<actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3e%200">
<actinic:block php="true" > MakeNav(0,2,0,<actinic:variable name="SectionID" />); </actinic:block>
</actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%200" >
<actinic:block php="true" > MakeNav(0,1,0,0); </actinic:block>
</actinic:block>
</actinic:block>
What is it?
its a set of blocks that allow the navigation to be inserted into the brochure pages, or the catalog, without generating any 'SectionID out of context' errors.
the blocks (if you take a peek at them) allow you to configure the way that the nav behaves, on pages such as the sitemap, and in searches.
overall a powerful addition. The original Block if idea came from a post by jan i think. thanks jan.
Guess i'm not assuming
Darren - I've rebooted etc
Comment
-
Originally posted by pinbrook View PostOk I'm clearly confused - what does the above mean?
Code:* usage example: MakeNav($sectid,$recursedepth,$prestyle,$thissect)
Comment
-
Jo the mak nav bit is the levels to show the tree e.t.c 0,2,0 will work, i played around with these ages ago basically its how the section list is shown.
ok all the block statements are what gabe has had to put in as actinic V9 produced aload of script errors, i dont know fully what gabe did but this was the fix for all then, well i guess not all by your post though. But you need all the code not just theCode:<div class="navcontainerment"> <actinic:block php="true" > MakeNav(0,1,0,0); </actinic:block> </div>
Comment
-
some points;
1: actinic is very awkward when it comes to items in the actinic_main.php
if there are any errors, or things out of place, then this is the first place to look. actinic maintains a list of php errors, in its program files folder. This thread might give you some insight. norman details another method to include the function, and i'v used that method too, to great success.
2: the numbers in the function are not very helpful.
yes, i was quick to code, and generally i thought only i'd use this php, so i wasnt very descriptive about the numbers.
Code:MakeNav(0,1,0,0);
This number is the depth at which the tree will expand. 1, means show only sections immidiately below this section.
This number is a switch. '0' Means expand only sections in this context. '1' means expand all branches up to this depth.
This number is the current context. This is used to determine if a section should expand, or have special css applied to it, when rendered. Passing 'SectionID' into this, causes the menu to expand and contract when the Actinic page changes.
3: Actinic preview is dire. Turn if off and use your browser. Actinic cannot render this menu properly in its own preview.
4: the div and id around the blocks for css, are only so that i can lock onto the div using css styles, they arent important to the rendering of the menu. this div allows clever styling of the structure.
Comment
Comment