Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 2:26 am (All times are UTC )

 




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Jump to content
Posted: Tue Jul 10, 2007 1:05 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon May 14, 2007 12:33 pm
Posts: 13
Hi I need to add a jump to content link and need some help please. I am using Joomla! 1.0.12 Stable. I have added an anchor "content" to my template and then I tried adding a link to it via the topmenu editor in the backend using link to url. This worked fine on the home page but it does not work on subsequent pages as it links to the home page. I then added some code to the template :
Code:
<li><a href="<?php echo getCurrentURL();?>#content" title="Skip to content">Skip to content</a></li>
But this gave me an error:
Code:
Fatal error: Call to undefined function: getcurrenturl() in /home/onnwmbtq/public_html/joomla/templates/js_lightfast/index.php on line 131
Any help, yes please! ???


Top
  E-mail  
 
 Post subject: Re: Jump to content
Posted: Fri Jul 13, 2007 8:51 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Aug 25, 2005 8:21 pm
Posts: 7
Location: Kiel
Hi,
this seems to be a known Joomla "oddity". You can get somehow around it if you build up your anchors/pagelinks this way:

(your anchor)

and

" title="jump to content">jump to content

But: This results in your page being reloaded. Anyhow, you're jumping to your anchor position then.
I have wrapped that into htmlentities() because I need to have the & parameters masked into & to provide valid xhtml strict sourcecode.

Still this puzzles me, because obviously you have a lot of page reloads then. If anyone can come up with a better solution
to mimic the standard anchor content jump links, I'd love to hear that.

Hope this helps.
Greets janwin


Top
   
 
 Post subject: Re: Jump to content
Posted: Mon Jul 16, 2007 7:48 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon May 14, 2007 12:33 pm
Posts: 13
Ta Janwin
Will try this and hope for a solution that does not require a page reload
cheers


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group