Link to Anchor on different page
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.
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.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Mon Jul 28, 2008 10:49 am
- Location: Sydney, Australia
- Contact:
Link to Anchor on different page
Hi Guys, using Joomla 1.5.
This page has an anchor at bullet point 6 called "file_extensions"
http://pcdom.com.au/kb/troubleshooting/ ... ?showall=1
How do I create a link in a different page that will link to this anchor?
The "insert URL" of JCE creates the code:
href="index.php?option=com_content&view=article&id=53:protect-myself-from-viruses&catid=39:troubleshooting&Itemid=60"
Where do I add the components "?showall=1" to get the whole page, and "#file_extensions" to get to the anchor?
I'd prefer not to hard code the link with "/kb/troubleshooting/53-protect-myself-from-viruses.html?showall=1#file_extensions" if possible because if I change any aliases the link becomes invalid.
Thanks.
Dom.
This page has an anchor at bullet point 6 called "file_extensions"
http://pcdom.com.au/kb/troubleshooting/ ... ?showall=1
How do I create a link in a different page that will link to this anchor?
The "insert URL" of JCE creates the code:
href="index.php?option=com_content&view=article&id=53:protect-myself-from-viruses&catid=39:troubleshooting&Itemid=60"
Where do I add the components "?showall=1" to get the whole page, and "#file_extensions" to get to the anchor?
I'd prefer not to hard code the link with "/kb/troubleshooting/53-protect-myself-from-viruses.html?showall=1#file_extensions" if possible because if I change any aliases the link becomes invalid.
Thanks.
Dom.
PC Dom: Sydney Computer Support
http://pcdom.com.au
http://pcdom.com.au
- ooffick
- Joomla! Master
- Posts: 11616
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: Link to Anchor on different page
Hi, it's this link:LiFers wrote:I'd prefer not to hard code the link with "/kb/troubleshooting/53-protect-myself-from-viruses.html?showall=1#file_extensions" if possible because if I change any aliases the link becomes invalid.
Code: Select all
index.php?option=com_content&view=article&id=53:protect-myself-from-viruses&catid=39:troubleshooting&Itemid=606&showall=1#file_extensions
http://pcdom.com.au/index.php?option=co ... extensions
Olaf
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 5
- Joined: Mon Jul 28, 2008 10:49 am
- Location: Sydney, Australia
- Contact:
Re: Link to Anchor on different page
So you add '&' - you're a genius - thank you!
(I had experimented with just adding it, and ';').
(I had experimented with just adding it, and ';').
PC Dom: Sydney Computer Support
http://pcdom.com.au
http://pcdom.com.au
-
- Joomla! Apprentice
- Posts: 6
- Joined: Thu Oct 09, 2008 8:26 pm
Re: Link to Anchor on different page
I must be missing something. I am having the same problem with anchors that LiFer describes under Joomla 1.5, but nothing I've tried is working, including ooffick's tip in this thread.
I originally just tried adding "#anchorname" to the end of the URL generated by Linkr, but that didn't work. So I tried navigating to the page, then adding "#anchorname" to the end of the URL in the address bar, and that works great. So I tried copying the now complete URL from the address bar and manually pasting that as my URL in the link in the previous article, but the "#anchorname" was consistently stripped. After much experimentation, I have determined that EVERYTHING in the URL AFTER the article ID number gets stripped and replaced like this:
URL in TinyMCE shows this:
http://wvprivacy.org/index.php?option=com_content&view=article&id=84
URL in web browser rendered page is this:
http://wvprivacy.org/index.php?option=com_content&view=article&id=84-privacy-policies-definitions&catid=25-privacy-category&Itemid=61
And if I try to input anything AFTER the article ID number, like this:
http://wvprivacy.org/index.php?option=com_content&view=article&id=84#anchorname
or this:
http://wvprivacy.org/index.php?option=com_content&view=article&id=84-privacy-policies-definitions&showall=1#protectedhealthinformation
It still appears in the browser like this:
http://wvprivacy.org/index.php?option=com_content&view=article&id=84-privacy-policies-definitions&catid=25-privacy-category&Itemid=61
I even tried replacing all instances of "&" with "&" as the ooffick suggests, but the result is the same.
Note that whenever I reopen my article in TinyMCE and examine the code, whatever I put there previously is still there as I typed it, so the URL rewrite is not being done by TinyMCE.
I really need this to work somehow. I'm even willing to go deep into php code page by page to find and remove the command that adds the catid and itemid to the URL (they aren't necessary - I've manually typed in the URL without them in the browser and gotten where I want to go), but I'm hoping someone can shed some light and show me what I'm missing in the way of a simpler solution.
Thank you.
I originally just tried adding "#anchorname" to the end of the URL generated by Linkr, but that didn't work. So I tried navigating to the page, then adding "#anchorname" to the end of the URL in the address bar, and that works great. So I tried copying the now complete URL from the address bar and manually pasting that as my URL in the link in the previous article, but the "#anchorname" was consistently stripped. After much experimentation, I have determined that EVERYTHING in the URL AFTER the article ID number gets stripped and replaced like this:
URL in TinyMCE shows this:
http://wvprivacy.org/index.php?option=com_content&view=article&id=84
URL in web browser rendered page is this:
http://wvprivacy.org/index.php?option=com_content&view=article&id=84-privacy-policies-definitions&catid=25-privacy-category&Itemid=61
And if I try to input anything AFTER the article ID number, like this:
http://wvprivacy.org/index.php?option=com_content&view=article&id=84#anchorname
or this:
http://wvprivacy.org/index.php?option=com_content&view=article&id=84-privacy-policies-definitions&showall=1#protectedhealthinformation
It still appears in the browser like this:
http://wvprivacy.org/index.php?option=com_content&view=article&id=84-privacy-policies-definitions&catid=25-privacy-category&Itemid=61
I even tried replacing all instances of "&" with "&" as the ooffick suggests, but the result is the same.
Note that whenever I reopen my article in TinyMCE and examine the code, whatever I put there previously is still there as I typed it, so the URL rewrite is not being done by TinyMCE.
I really need this to work somehow. I'm even willing to go deep into php code page by page to find and remove the command that adds the catid and itemid to the URL (they aren't necessary - I've manually typed in the URL without them in the browser and gotten where I want to go), but I'm hoping someone can shed some light and show me what I'm missing in the way of a simpler solution.
Thank you.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Mon Jul 28, 2008 10:49 am
- Location: Sydney, Australia
- Contact:
Re: Link to Anchor on different page
I'm using URL re-write and SEO optimised URLs and add suffix to URLs, which it looks like you may not be using. Perhaps this may be a reason - I'm not sure.
PC Dom: Sydney Computer Support
http://pcdom.com.au
http://pcdom.com.au
-
- Joomla! Apprentice
- Posts: 29
- Joined: Tue Nov 18, 2008 11:15 am
Re: Link to Anchor on different page
I was trying to use anchors on different pages... I tried everything but didn´t work.
So I put the two articles in just one, the anchors works. But when I try to use page break between them tha anchors stop working
Any idea?
Pat
So I put the two articles in just one, the anchors works. But when I try to use page break between them tha anchors stop working
Any idea?
Pat
- Pylon
- Joomla! Enthusiast
- Posts: 150
- Joined: Tue Aug 28, 2007 3:29 pm
- Location: London, UK
- Contact:
Re: Link to Anchor on different page
Don't think youcan do this, even with an advanced third party editor like JCE.
See http://www.joomlacontenteditor.net/foru ... enu#p14586
See http://www.joomlacontenteditor.net/foru ... enu#p14586
http://www.pylondesign.co.uk We don't design Pylons...
http://www.villasanraffaello.com Big Villa for holiday rental in Le Marche, Italy
http://www.villasanraffaello.com Big Villa for holiday rental in Le Marche, Italy
- ooffick
- Joomla! Master
- Posts: 11616
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: Link to Anchor on different page
Try to use an anchor like this:Pylon wrote:Don't think you can do this, even with an advanced third party editor like JCE.
See http://www.joomlacontenteditor.net/foru ... enu#p14586
Code: Select all
<a name="p14586"></a>
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
- Pylon
- Joomla! Enthusiast
- Posts: 150
- Joined: Tue Aug 28, 2007 3:29 pm
- Location: London, UK
- Contact:
Re: Link to Anchor on different page
I've found an extension to do this without you or the client getting involved in the undelying code.
To link to specific anchor positions within same/other article content you can use/need 'LinkR'
Get it here:
http://extensions.joomla.org/extensions ... links/4010
To link to specific anchor positions within same/other article content you can use/need 'LinkR'
Get it here:
http://extensions.joomla.org/extensions ... links/4010
http://www.pylondesign.co.uk We don't design Pylons...
http://www.villasanraffaello.com Big Villa for holiday rental in Le Marche, Italy
http://www.villasanraffaello.com Big Villa for holiday rental in Le Marche, Italy
-
- Joomla! Fledgling
- Posts: 3
- Joined: Sat Jul 26, 2014 8:08 am
Re: Link to Anchor on different page
Hello,
I'm on Joomla! 3 but I have the same problem : links to anchors after a page break do not work.
The solution consisting in copy-paste the destination page URL in the external link field
and add #anchorname at the end of the line worked fine for me.
BUT unfortunately,
if I skip from the page break style "Pages" to "Tabs" (in: Extentions/Plugin Manager/Content - pagebreak) the links formerly created give up working, and I'm unable to create functional new ones.
It's sad, because I really find useful the "Tabs" page brake style, and I must have links between different pages...
Please help me
Tropiet
I'm on Joomla! 3 but I have the same problem : links to anchors after a page break do not work.
The solution consisting in copy-paste the destination page URL in the external link field
and add #anchorname at the end of the line worked fine for me.
BUT unfortunately,
if I skip from the page break style "Pages" to "Tabs" (in: Extentions/Plugin Manager/Content - pagebreak) the links formerly created give up working, and I'm unable to create functional new ones.
It's sad, because I really find useful the "Tabs" page brake style, and I must have links between different pages...
Please help me
Tropiet