• 0
Sign in to follow this  
Followers 0

DMS 2 Scrollspy link?


Question

Posted · Report post

I could have sworn I read in the documentation somewhere about creating a scroll-spy link using HTML (something like <a href="somesection" rel="scroll-spy" class="btn">button</a>), but I can't find it where I expected to. Is this possible? Basically, I want to use scroll spy from the main menu, instead of a separate scrollspy section. Possible, or do I need a different plugin?

Share this post


Link to post
Share on other sites

6 answers to this question

  • 0

Posted · Report post

HI,

 

I am not entirely sure what you mean to be honest, are you saying you want to use the WordPress menu system and have it use the scrollspy smooth scrolling ?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Generally, I'd like to be able to create a link that goes to a scroll-spy section. Specifically, yes, I'd like to use the links in the menu for scroll-spying (verb?) a one-page site.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

You can not use the WordPress menu to populate links in the ScrollSpy section, all links for the section are added via HTML code that you add to the page. There is no other way off adding links to the section.

 

http://docs.pagelines.com/tutorials/using-scrollspy

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I think you are describing two different things. Scroll spy is a navigation that highlights where you are on a page. So if you want that, then add it to the header area and set up as described here (if you add it to fixed top, then you will have the strange effect when you scroll down the page of the fixed top area showing a blank space, after the scroll spy drops down

 

If you want to have a menu with anchors that navigate to a set place on the page then you set those up by using the link option when configuring a WP-admin menu. For the link, use #YourAnchorName, your title and then in page add <span id="YourAnchorName"></span> wherever you want the link to scroll to. However it will not show the anchor title as being active in the way that scroll spy does

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks guys. The main thing I'm looking for is smooth scrolling to the anchor links. Bonus for highlighting the menu item. I know other plugins can do this, but ideally I wouldn't add another javascript file, for performance reasons.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Guys, from the last comments made from Bushi "The main thing I'm looking for is smooth scrolling to the anchor links" & "I know other plugins can do this, but ideally I wouldn't add another javascript file, for performance reasons."

 

If i understand him correctly, its basically what i would like to know also. I have recently added 2-3 anchor links to about 50 of my pages on the website http://lovepattayathailand.com

 

 

Ive been looking at implementing scrolling transitions for the anchor links i have. Im not a programmer and jquery and javascript coding isnt something im familiar with so ive been looking at using some plugins for the job. The trouble is, like Bushi mentioned, i dont really want to be adding additional jquery scripts if i dont have to.

 

This scroll spy section uses the exact scrolling transition im looking for, but, i just want the transition effect added to my existing anchor links if possible (Like other plugins), if not, is it at all possible to use scroll spy without adding the additional navigation bar, just use it for creating different anchor link classes / id's?

 

Basically i want to know if i can use scroll spy transition effect for traditional anchor links? Im doubtful it can be done very easliy as im sure  it would have been mentioned in the docs already but i wanted to ask in case.

 

Also just to mention,  like the ALL other DMS sections, its not great that scroll spy only allows for single configuration to be used on a template, why we cant use sections and adjust settings on a per page basis i dont know.

 

Not all pages using the same template have the same content. One page might have 5 points of interest, some might only have 3. A basic "beer bar" page would have a "photo gallery" and a "Google map", so my scroll spy would have the titles "Photo Gallery" & "Map" in the nav.

But what happens when some of the beer bar pages have "Promotions" & "Food & Drink" as well? Do separate template need to be used for these pages, do i have to hide the titles somehow? It just seems like a bit of an oversight with templates / sections / global / local settings with DMS sometimes.

 

Any help, tips or advice is appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0