Using anchor tags in articles or section titles

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
wfws
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Wed Mar 10, 2010 8:53 pm

Using anchor tags in articles or section titles

Postby wfws » Fri Mar 19, 2010 12:23 am

In my Joomla layout the article text typically appear farther down on the page. Most times I want my viewer to move to the section title or the start of the article text when they click a link.

I put an anchor tag in the both article and in the section title box, but I can't seem to get my href #anchorname to find the anchor.

Anchors within an article seem to work fine. How do I use an anchor to move between articles? Say an anchor ref in a section title, set to an anchor in an article? Or an anchor ref in an image set to a menu item?

I'm looking all over for this. But if you have a second and can point me I'd greatly appreciate it. ;D

wfws

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

Re: Using anchor tags in articles or section titles

Postby Webdongle » Fri Mar 19, 2010 2:08 am

The answer is simple viewtopic.php?f=466&t=499233 has an example in one of the posts.
'When I'm right nobody remembers when I'm wrong nobody forgets.'
www.weblinksonline.co.uk/
www.weblinksonline.co.uk/tutorials/joom ... lhost.html

wfws
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Wed Mar 10, 2010 8:53 pm

Re: Using anchor tags in articles or section titles

Postby wfws » Fri Mar 19, 2010 2:33 pm

Thanks! The link explains it very well, and I'll be using that info alot.

But I also discovered that I can link to the ID classes in the index.php file. So in my case I use the class="menu_bg" from the index.php file for the template I'm using. Its the background for the menu bar that's right above the area where text content begins.

To reference it, I add that class to the end of my url path starting with a # symbol. To be sure I get the path correct I just navigate to the right spot, and copy that URL from my browser nav bar.

This way I don't have to insert an anchor in each article. I can use that same anchor in every content piece that displays below the menu bar.

I think this may not be optimum for SEF, but I'll get to that later. For now, its an easy way to use the Index page 'layout' to anchor links.

wfws.

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

Re: Using anchor tags in articles or section titles

Postby Webdongle » Fri Mar 19, 2010 3:31 pm

I suggest that if you will be using SEF, that you set the SEF before copy/pasting the links.
'When I'm right nobody remembers when I'm wrong nobody forgets.'
www.weblinksonline.co.uk/
www.weblinksonline.co.uk/tutorials/joom ... lhost.html


Return to “Administration 1.5”

Who is online

Users browsing this forum: No registered users and 11 guests