Link to Anchor on different page

General questions relating to Joomla! 1.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
LiFers
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Jul 28, 2008 10:49 am
Location: Sydney, Australia
Contact:

Link to Anchor on different page

Post by LiFers » Mon Oct 06, 2008 8:40 am

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.
PC Dom: Sydney Computer Support
http://pcdom.com.au

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11616
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Link to Anchor on different page

Post by ooffick » Mon Oct 06, 2008 3:22 pm

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.
Hi, it's this link:

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
if you want to click on it, it's here:

http://pcdom.com.au/index.php?option=co ... extensions

Olaf
Olaf Offick - Global Moderator
learnskills.org

LiFers
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Jul 28, 2008 10:49 am
Location: Sydney, Australia
Contact:

Re: Link to Anchor on different page

Post by LiFers » Mon Oct 06, 2008 4:32 pm

So you add '&' - you're a genius - thank you!

(I had experimented with just adding it, and ';').
PC Dom: Sydney Computer Support
http://pcdom.com.au

cvc1968
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Oct 09, 2008 8:26 pm

Re: Link to Anchor on different page

Post by cvc1968 » Thu Oct 09, 2008 8:45 pm

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&ampview=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.

LiFers
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Jul 28, 2008 10:49 am
Location: Sydney, Australia
Contact:

Re: Link to Anchor on different page

Post by LiFers » Fri Oct 10, 2008 3:30 am

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

patbessa
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Tue Nov 18, 2008 11:15 am

Re: Link to Anchor on different page

Post by patbessa » Mon Mar 23, 2009 2:40 am

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

User avatar
Pylon
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 150
Joined: Tue Aug 28, 2007 3:29 pm
Location: London, UK
Contact:

Re: Link to Anchor on different page

Post by Pylon » Fri Jul 24, 2009 11:53 am

Don't think youcan do this, even with an advanced third party editor like JCE.

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

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11616
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Link to Anchor on different page

Post by ooffick » Fri Jul 24, 2009 1:10 pm

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
Try to use an anchor like this:

Code: Select all

<a name="p14586"></a>
Olaf
Olaf Offick - Global Moderator
learnskills.org

User avatar
Pylon
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 150
Joined: Tue Aug 28, 2007 3:29 pm
Location: London, UK
Contact:

Re: Link to Anchor on different page

Post by Pylon » Tue Nov 10, 2009 10:57 am

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
http://www.pylondesign.co.uk We don't design Pylons...
http://www.villasanraffaello.com Big Villa for holiday rental in Le Marche, Italy

tropiet
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Jul 26, 2014 8:08 am

Re: Link to Anchor on different page

Post by tropiet » Mon Jul 28, 2014 1:04 pm

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


Locked

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