Hello,
Not quite sure how to fix this. When I import assets, images for example in a document or folder that is one level deep (ie: newcfk.com/about-change-for-kids), the image shows up fine. For example the image path would be this: assets/images/photos/bio-photos/3121045381.jpg
However, when in a document or folder that is beyond one level deep (ie: newcfk.com/about-change-for-kids/meet-the-team), MODx still inserts the same path: assets/images/photos/bio-photos/3121045381.jpg and the image does not show up.
If I manually add [(site_url)] to the beginning of the path it works fine, but how do I get MODx to automatically know the path based on how many levels deep the document is? It tried adding [(site_url)] to resource URL in Tools > Configuration, but that didn’t work.
Thanks in advance for any advice!
- Jess
-
☆ A M B ☆
- 24,524 Posts
Try putting a meta tag
<base href="[(base_url)]"></base>
in your template head. This form of the meta tag should be used to avoid problems with various versions of IE that choke on the self-closing format.
Great, that worked - thank you!
One last thing, when using the file manager, I can’t actually see any of the photos - I get the broken link image (with the question mark), although the images import just fine.
-
☆ A M B ☆
- 24,524 Posts
If you can, right-click on the broken image and see what path it thinks it’s supposed to be using. Compare this with what the path is near the bottom of the phpinfo() view in Reports -> System info. Sounds like you need to adjust the paths in the Configuration.
I have seen problems in MODx when u have this in path: ~
a2s38.a2hosting.com/~cfknyc/newcfk.com
Try using subdomain instead of that url, and it should work fine.
Hope it helps.
-
MODX Staff
- 10,725 Posts
The File Manager does not allow access to the files in manager/. Never has.
Thanks Zi, I’ll try that!
The <base href="[(base_url)]"></base> doesn’t seem to work on pages you link to via the text editor though - or maybe this is a separate issue: link url’s that are populated like this: [~55~] don’t point to the right directory...