Modx - Add an Anchor Tag
Anchor tags link text or an image on one part of a page to content in another part of the page. Probably the most familiar form of anchor tag is the ubiquitous "Back to Top" link whch takes you back to the top of the page. These are useful in longer documents.
Most people expect to be taken to a different page when they click on a link. Use anchors judiciously and always ask yourself if it would be better to break the content out on several pages instead of one long one.
That said, here's how you make an anchor!
- Go down (or up) to wherever you want people to land when they click on the anchor link.
- Click your cursor just before the landing content. Then click the little Anchor icon in the editor toolbar (see below):
- Type in your anchor name. Make sure there are no spaces in the name. Then hit insert. You should see a little anchor graphic on the page when your're done (see below):
- Now head back to where you want to place the link text for your shiny new anchor. Type in and highlight (or highlight the existing text) of what will be your anchor link. Then click on the link icon. In the link window, you'll see a dropdown for anchors. Yoru anchor should be in that list. As that lest grows, you might find it easier to just type in the name of your anchor preceded by a hash mark ie: "#physics" (see below):
- Click insert and you have one beautiful anchor tag! Yes, you totally rock. Repeat this process as needed and remember to save your page.