Link to HtmlModule on same page

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
9/16/2018 4:54:55 PM
ABM
Gravatar
Total Posts 34

Link to HtmlModule on same page

Going with the trend of having multiple HTML modules on a page (as seen in the Scout skin), how can I add links in my nav bar to the different sections on the current page? Right now, just to get this to work, I'll end up adding the markup for the links in my nav bar to layout.master (but have to hide it on all pages but the page where it applies). Custom javascript would have to do a jQuery animate to ScrollTop of the top of my section as defined by a custom class on my html module.

I guess I could also put all my content in 1 html module where I define the anchor tags appropriately.

I'm hoping someone has an easier way to do this. Thanks in advance!

9/27/2018 11:14:38 AM
Gravatar
Total Posts 2140

Re: Link to HtmlModule on same page

Hi,

There is a round-a-bout way to do this. First, get the module id of the module you want to link to. To do this, hover over the settings link for the module and make note of the number after the "mid" parameter. Next, create a new page in your menu and set the url for the full url of the page containing the module with #moduleNNN at the end, where NNN is the module id. So, if the module id is 456 and the page url is http://www.some.url/page, then the url you will enter for this menu item is http://www.some.url/page#module456

Hope this helps,
Joe

10/1/2018 10:40:38 PM
ABM
Gravatar
Total Posts 34

Re: Link to HtmlModule on same page

Thanks Joe!

You must sign in to post in the forums. This thread is closed to new posts.