10848 Posts in 2516 Topics by 1792 members
|Go to End|
20 March 2012 at 11:42am
I just cannot get this working.
I have installed the Superfish module - nothing shows up when I run the /dev/build so I have no idea if it is correctly installed.
I have found crumbs here and there of how to implement superfish menus and I have tried them all but nothing seems to work.
The README says:
1. Find out how to add modules to SS and add module as per usual. - I am assuming directory name superfish ????
2. copy configurations from this module's _config.php file into mysite/_config.php
When I open the supplied _config.php file I see this:
//copy the lines between the START AND END line to your /mysite/_config.php file and choose the right settings
//===================---------------- START superfish MODULE ----------------===================
//SuperFish::include_code(); // ADD to Page.init() function NOT mysite/_config.php
This seems like lines 1 and 3 give conflicting advice so I have no idea what to do.
Perhaps someone can tell me how this is done (in a noob's way) or point me to a guide on how to do it.
22 March 2012 at 3:47am
Followed this post http://www.silverstripe.org/general-questions/show/7703
Did what Nick Jacobs said here:
<ul id="topmenu" class="sf-menu sf-navbar">
<% control Menu(1) %>
<li <% if LinkOrSection = section %>class="current"<% end_if %>><a href="$Link" >$MenuTitle</a>
<% if Children %>
<% control Children %>
<li class="$LinkingMode"><a href="$Link" >$MenuTitle</a></li>
<% end_control %>
<% end_if %>
<% end_control %>
dropShadows: false ,
Just doesn't work for me, completely out of ideas.
24 March 2012 at 9:26am
Where did you placed your Requirements? In the Page_Controller init() functionI guess? Can you check your source HTML if the files are actually loaded? The paths don't seem quite right to me: you need to calculate them from the website root:
So if you have your superfish.js file somewhere like in /superfish/js/superfish.js, then your requirement should be something like
same goes for the other files..
26 March 2012 at 1:28pm
martimiz I was not actually using those paths, that was an excerpt from Nick Jacobs' response.
However you did give me the answer - for a 'belt and braces' approach I used the absolute paths for those requirements, I forgot SS adds the 'home' path by default.
Once I looked at the page source and corrected the paths I got it working!
Thanks so much!
|Go to Top|