SOLVED: Linking a Menu item to some text

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
cosp
Forum Members
Forum Members
Posts: 24
Joined: Mon Mar 17, 2008 2:05 am

SOLVED: Linking a Menu item to some text

Post by cosp »

How can redirect a user after he clicks a menu item on the same page but a difference heading, something like anchor? but how?
Last edited by cosp on Sat Apr 12, 2008 10:22 am, edited 1 time in total.
masada
Forum Members
Forum Members
Posts: 29
Joined: Thu Nov 08, 2007 6:04 pm

Re: Linking a Menu item to a text item like heading

Post by masada »

Could you give an example of this? I'm not sure I understand what you mean.

thanks
cosp
Forum Members
Forum Members
Posts: 24
Joined: Mon Mar 17, 2008 2:05 am

Re: Linking a Menu item to a text item like heading

Post by cosp »

got reply... Thanks to calyguy0000 on irc (sorry if i placed an extra/less zero :P )

For people who might face the problem i faced.

Problem:

A page contains many headings. And we want to create menu items that can be linked to those headings. Something like a left aligned index.

___________________________PAGE_______________________________
-StartMenu-------------------------Content---------------------------------------------------------
-Click to go to heading 1 ------Content---------------------------------------------------------
-Click to go to heading 2 ------Content---------------------------------------------------------
-Click to go to heading 3 ------Content---------------------------------------------------------
-Click to go to heading 4 ------Content---------------------------------------------------------
-Click to go to heading 5 ------Content---------------------------------------------------------
-EndMenu---------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------heading 1-------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------heading 2-------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------heading 3-------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------heading 4-------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------heading 5-------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
----------------------------------------Content---------------------------------------------------------
______________________END OF PAGE___________________________



so i hope you would have guessed, page is filled with content and very long, and we want to have a user to jump to any heading by clicking a menu item instead of scrolling down. So what's the solution?


Solution:
Read "The Anchor Tag and the Name Attribute" at http://www.w3schools.com/HTML/html_links.asp
changed all headings (or the text that you want menu items to point to) into anchor
Create a new menu item, change its type to Link
and put in the link of the anchor that it's name crossponds to.




I guess this was a very small problem, in which a noob like me got into. Just wanna let other noobs know who are at my level on how to solve this problem. Though i really doubt if a single person learnt a new thing out of it coz anchors are very common, and almost all internet surfers know that, except me :P
Post Reply

Return to “CMSMS Core”