Hi! I’ve copyed a templates on my server version .... this template works on my localhost
but I can’t view CSS, images
in template I’ve
<link rel="stylesheet" type="text/css" href="[[++base_url]]assets/templates/memorial/style.css" />
in HTML I show
<link rel="stylesheet" type="text/css" href="/assets/templates/memorial/style.css" />
Can you help me??
Thanks
-
MODX Staff
- 10,725 Posts
The base tag in your HEAD (which is required in all MODx templates) should already point you to the base_url. You do not need to prefix your images or stylesheets with [[++base_url]].
Also, if you transferred this to a server, did you run setup in upgrade mode so the cache is cleared and all the paths updated? Or you can manually delete all the files in core/cache/ to clear the cache, though other paths in settings may need to be manually updated.
Resolved.... problem with cache!!
Thanks
Quote from: OpenGeek at Feb 24, 2010, 03:49 PM
The base tag in your HEAD (which is required in all MODx templates) should already point you to the base_url. You do not need to prefix your images or stylesheets with [[++base_url]].
That’s interesting... although I have worked on sites with Base tags in templates before, I almost never use them anymore. That’s actually one of the things that I like about MODx, it just "figures it out" on the hosts I’ve used. And so many things work with relative paths... my other vice, Wordpress, does not, which makes moving sites around a slight PITA. A WP newbie will blithely move their test site to the root, and boom, no more images in their content. MODx, heck, it doesn’t even care.