MODx How To Properly Link To a Page

Sharing is Caring

In MODx, it is always preferable to link to another page using the document id instead of using the friendly alias because sometimes MODx Evolution has a package that is appearantly capable of using the alias instead of the document id to provide a working link to another page.

The reason you shouldn’t use the alias instead of the document id is because it isn’t unheard of to have google or other search engines incorrectly access another page perhaps one that isn’t even available.

Using the document id is done in the following manner for Evolution:

>a href = "[˜77˜]"<Link to document 77>/a<

Using the document id is done in the following manner for Revolution:

>a href = "[[˜77]]"<Link to document 77>/a<

The documentation for MODx Revolution is really geat and should be used to learn additional things.

Hope this helps!

Author: Brian Cline

Brian is a programmer living in Niagara Falls with ten years of development experience. He is passionate about automation, business process re-engineering, and gamification. For the last six years or so, he has been working with Salesforce and JavaScript.

Related Posts

Sharing is Caring

Comments are closed.