Jump to content


Photo
- - - - -

Custom Scroll Spy Nav ID name


  • Please log in to reply
5 replies to this topic

#1 josh1178

josh1178

    Super Member

  • Members

  • 181 posts
  • Framework Version:2.3

Posted 23 July 2014 - 02:22 AM

Currently if I want to deep link to a scroll spy tab, it looks like this. 

/#spyID1

 

Is there some way to customize this without having to add some custom anchors into the html? 

Thanks



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17533 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 23 July 2014 - 10:51 AM

Hi,

 

I am not entirely sure what you mean, Scroll Spy uses the title attribute to populate the menu. You can find a guide here - http://docs.pageline...using-scrollspy



#3 josh1178

josh1178

    Super Member

  • Members

  • 181 posts
  • Framework Version:2.3

Posted 23 July 2014 - 06:36 PM

If you want to deeplink to a section of your page using a url like: http:myshop#Video it doesn't work, even though video is the title.

 

Instead, we must use /#spyID3 if you want to link to that section of the page. 

 

It's a bit messy/ugly to have spyID3 instead of the title. I can build an anchor into the section with the proper name, but it's an extra bit of code that I'd rather not have to use if there is another way to just use the title as an anchor. 



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 17533 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 24 July 2014 - 10:18 AM

You do not use anchors with Scroll Spy, the documentation shows you how to use Scroll Spy. In order to populate the menu, you need to add some HTML along with the title attribute.

 

If you want to target a specific section using Scroll Spy, then you will need to use HTML above the section you wish to target. The simplest way would be to follow the instructions on the Scroll Spy documentation I linked you and add that HTML to a MediaBox which has been positioned above the section you wish to target.



#5 josh1178

josh1178

    Super Member

  • Members

  • 181 posts
  • Framework Version:2.3

Posted 24 July 2014 - 07:32 PM

Thanks Danny. I already had it working fine, my question was only about anchoring. 

 

I will build custom anchors. Thanks.

 



#6 Danny

Danny

    Is Awesome!

  • Moderators
  • 17533 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 25 July 2014 - 10:03 AM

OK, no problem.