Hello,
I am new to working with ModX. I am deploying new template files to ModX and for some reason, all of the hyperlinks to other sites are being malformed by ModX. I know that ModX has capabilities to setup resources to be viewed as web links....however, this is really alot of overkill on me just needing to place a generic link in a template.
What setting can I configure where my "href" attributes are ignored. I know it is possible because I am seeing it in other ModX sites.
Please help. This is a silly thing to get stuck on.
FYI - I am needing the correct absolute URL in my hyperlinks. Modx changes these URLs and adds the base url, in addition to other stuff. I understand this need for other pages in the modx site...but not when I am trying to link to something different entirely.
One option is to go to System Settings. Search for 'link_tag_scheme' and change it to abs. This will make all [ [~#] ] links absolute for you. This does not affect makeUrl() in a Snippet but resolves general MODx linkage when you need an absolute link.
For Snippets that use Chunks (templatizing), you can add a prepending slash to the link. (i.e. href="/[ [~[ {+id] ] ] ]). Some extras use default MODx behavior and some don't, so you may have to modify Chunks accordingly.
Thanks for the reply, Fuzzical. Those options did not help, however. I apparently don't have the ability to go to the system settings. I am using "chunks" so I did try the other option...however, it didn't help.
This version of ModX is Evolution 1.0.6. Any other ideas?
I apologize, the options I gave were for Revo. I'm not familiar with Evo.
-
☆ A M B ☆
- 24,524 Posts
If you put a link in a template, you have to put the whole thing:
<a href="http://www.site.com">Link</a>
-
☆ A M B ☆
- 24,524 Posts
Hm. That is not at all what I entered, and when I edit the post it shows just ordinary a tags. I'm sorry, it should not look like that at all. The forum text input processor apparently thought it needed to try to make a proper URL out of just code. What I meant was to have
As far as your issue, it's odd, but I've never run across that unless I've forgotten to put the protocol (the http:// part) in the href attributed. What plugins do you have installed? What does your base tag in the template head output?
(I'll report the rendering bug in the forum editing field).
[ed. note: sottwell last edited this post 14 years, 1 month ago.]
Thanks Susan. I actually have ensured that the host/base urls were removed from the head.The URLs in the HTML syntax are also specified with the "http" correctly.
This really is mind boggling. I have never had an instance of any CMS system automatically changing a hard-coded URL setup in a link...very frustrating actually.
-
☆ A M B ☆
- 24,524 Posts
Well, I have to say that I've never heard of this happening in MODx either. That's why I asked what plugins you have installed.