Hi Everyone!
I've posted a few questions on here over the last few days, you're all great!!
In part of the site we're building, we've got a slider that shows the different programs that are available within the category. Basically, this is a grid of 3, where the the left and the right ones are partly faded, and the middle on shows as active.
We've got the JQuery working and the styling and we're now moving it into MODx. Because of the number of categories and the different programs available in each category, we need to automate this, so we're using wayfinder to build it up.
I've got the script in and it works once the first scroll has occured, but when the page first loads, none of the classes have the 'active' class associated with them. Instead, you have to wait a few seconds before the slider first scrolls and then an active class is assigned.
Hopefully this makes sense, I can't really post the URL on here but if you PM me, I can share it!
Kind regards,
Lewis
-
☆ A M B ☆
- 24,524 Posts
The jquery plugin you're using should take care of that. Wayfinder just provides the unordered list that the javascript wants to work with.
-
☆ A M B ☆
- 24,524 Posts
Is there a classname for the first item in the original, but not in the MODx-generated version? Check a view source in your browser and make sure that it's exactly like the static version that works.
You should also be aware that wf.classnames will insert the class names without the class="..." attribute key. It's used if you are specifying a class attribute already in the tpl, and want to add the dynamic classnames like "first" or "last" or "active".
Thanks for this, I'll take a look and see if I can figure it out.
It's a bit of a strange one and I was pretty sure I'd got it right first time but there's obviously something missing!
Just on a separate note, is there a way to pull in the ID of a child page using wayfinder? For example in the following structure:
Top Level Menu
------ Sub Menu
------------ Sub Sub Menu
Would it be possible to bring in the titles of the 'sub sub menu' pages from the 'top level menu' ?
I've got a list of resources within the sub sub menu that I want to pull in from the top level menu page. Again, automating the process is the nicest way of doing it if possible!
Kind regards,
Lewis
[ed. note: LewisSellers last edited this post 13 years, 5 months ago.]
Hi All,
Does anyone have any ideas on how I can achieve the above?
Thanks you in advance.
Lewis
-
☆ A M B ☆
- 894 Posts
For your first issue if you haven't solved it can you provide a link we can check?
For your wayfinder sub sub menu issue try using the &includeDocs parameter to see if it will work check out the
wayfinder documentation for more info.
Good Luck.