How to Anchor link to module from article??

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
surendra
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Sat Mar 31, 2007 8:34 am

How to Anchor link to module from article??

Post by surendra » Mon Apr 22, 2013 4:26 am

I have page article page and below that we have modules block related to articles points.

Bcoz this page is too long so I want to create anchor to link to modules block so when we click on point 1 it goes to module 1 and so on....

But when I am doing this, the link of point 1 goes to module 1 but it did't show the title of module and also hide all other modules and their title.

I am looking for a way to link within the article to module and when we click on it, it goes to anchor module position and still show other modules and title when we browse the page up and down.

Thanks

User avatar
pxforti
Joomla! Hero
Joomla! Hero
Posts: 2755
Joined: Wed Apr 04, 2007 8:54 pm
Location: Driggs, Idaho

Re: How to Anchor link to module from article??

Post by pxforti » Mon Apr 22, 2013 3:07 pm

If it's a custom module, you can put an anchor at the top of the content. If it's not a custom module, then modify module template to add the anchor.
Joomla Website Design / CS-Cart Website Design
http://writenowdesign.com

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44070
Joined: Sat Apr 05, 2008 9:58 pm

Re: How to Anchor link to module from article??

Post by Webdongle » Mon Apr 22, 2013 3:27 pm

You want the Article scroll to be in sync with the scrolling of the modules in the module position ? If that is what you want then using anchors may not achieve that effect. You could put an if else statement in your Template's index.php file. The if else would see what url/anchor was showing and display the module position accordingly. You would then need to put each module in the module position that corresponds to the url/anchor.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
Dan1980
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed Feb 01, 2012 11:03 pm

Re: How to Anchor link to module from article??

Post by Dan1980 » Thu Sep 25, 2014 10:33 am

Just in case anyone is still interested, in Joomla 2.5.x and 3.3.x you can achieve this if you are running JCE 2.4.3+. So, this means you can create a Custom HTML module, set the Title to "Hide", and in the content just put an anchor on its own (no spaces, no other content).

Now say that you have a module in the "footer" position (for example), and you want your link to click through to an anchor that will take the user down to the start of the 'footer' position:

[*] Create your button wherever it is going to go. Set the URL to #new1 (for example)
[*] Create a new Custom HTML module
[*] Set it to the 'footer' position
[*] Set the Title to 'hide'
[*] In the content, just put an anchor only, and label the anchor as new1
[*] Save this and then return to this module
[*] Make sure that the Ordering of this module is set such that it is above the other module that is also in the 'footer' position

That's it. You should now be able to click the button that links to the #new1 anchor, and should take you down the page to the 'footer' position where your 'anchor' Custom HTML module will be invisible (and above your other 'footer' positioned module).

Easier and neater IMHO than hacking the module that you want to put an anchor in.

Hope this helps someone.

User avatar
formfranska
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 179
Joined: Sun Dec 28, 2008 3:25 pm
Location: Sweden
Contact:

Re: How to Anchor link to module from article??

Post by formfranska » Sun May 24, 2015 8:37 pm

Thank you Dan1980 :-)
Joomler in Sweden :-)
https://www.formfranska.com

User avatar
Spell
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Sat Jul 12, 2008 5:46 pm

Re: How to Anchor link to module from article??

Post by Spell » Fri Jul 28, 2017 4:03 pm

Dan1980 — thank you big time for this invaluable tip! Three years later, this just saved my bacon, haha.

As a further note, depending on the template, inserting an invisible module can sometimes add a little extra "margin" height between modules, in my case about 30 px. If you have other modules in succession, as an alternate solution, you can insert the normal anchor code into the content at the bottom of the previous module that is displayed just above the one you want to link to. Do this with the editor turned off so it won't insert paragraph HTML code also (which adds space). This won't add any extra height to the margin. Thanks again for your tip.

rast537
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Mon Feb 16, 2015 9:33 am

Re: How to Anchor link to module from article??

Post by rast537 » Sun Jan 28, 2018 12:16 am

Thanks a lot to Dan1980 and to Spell. You guys saved my bacon too :)


Locked

Return to “General Questions/New to Joomla! 2.5”