Hello,
I am using Wayfinder to create my menu.
But I have a onepage website. How can I do to send each menu link to a section of the website instead of a page?
Thanks!
If it's a onepage site, I think it would simply make it manually.
You prob. could generate it, but it depends on how you create the sections of the page? One long content field, tv's, different resources?
-
☆ A M B ☆
- 894 Posts
You can do it manually as Mathias said which would be the fastest and easiest way to achieve this or if you want to use Wayfinder then you can create a custom rowTpl and change what it uses as the link value.
Here's a quick example:
<li[[+wf.id]][[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a>[[+wf.wrapper]]</li>
You can change the href to use wf.linktext instead of wf.link and prepend it with a hash so it sends the page to the id on the page with the linktext value.
Hi everybody!
I have the same task: one page website where after clicking at menu link webpage scrolls to the proper section.
Or you can scroll the whole page with mouse from top to bottom.
I want to organize each section as a resource with pagetitle as menu item and content as content for part of the webpage.
I think to use wayfinder to make a menus and getResources snippet to build the webpage from pieces.
Is it right way to do so or may be there is more easy and efficient way?
Did anybody has such a task?
Thank you!
-
☆ A M B ☆
- 24,524 Posts
You have the right idea.
Each section has its own resource, and getResources loads them with the appropriate chunk tpl. Wayfinder uses the same resources to generate the menu, using a custom rowTpl to handle the anchor.
-
☆ A M B ☆
- 24,524 Posts
The
Bootstrap framework is a good place to start, you can install a MODX-ready port of it from the Package Manager.
-
☆ A M B ☆
- 24,524 Posts
I really like this one, but they use a Javascript-based framework that I don't much care for.
http://html5up.net/strongly-typed
http://skeljs.org/
Quote from: sottwell at May 05, 2014, 12:55 AMYou have the right idea.
Each section has its own resource, and getResources loads them with the appropriate chunk tpl. Wayfinder uses the same resources to generate the menu, using a custom rowTpl to handle the anchor.
Susan thanks for your quick reply!
Summary:
I've done all the tasks ( menu in different sections and content of one-page-site ) only with getResources snippet calls.
Just different templates and little bit output modifiers.