|
Date: 3/1/2007 11:05 pm · Subject: Re: Overwritting images in the Assets Bin · Rating: -5
If you're having to change the url of the image all the time, then that's because you're using the url of the asset directly in your template then. When you create an image object it has two urls. One is the webgui url to the image object (say /home/image.jpg), and the second is the actual image itself which are given a /uploads/xxxxx/xxx.jpg kind of url. If you're linking to the latter, then yes, once your asset changes the url will no longer be pointing to the right one. Two ways to beat this. One is using the ^FileUrl(<asset url>); macro - this will convert the asset url into the image url on the fly. The second is using the "enableStreamingUploads" : "1" config option. This allows you to use all asset urls directly and have them auto-converted on the fly. This is a config option which goes in your webgui.conf file. Another useful config setting related to this is "richEditorsUseAssetUrls" : "1" - which ensures that any images you add through the rich text editor use the asset urls rather than the direct image url. Both these options have a bit of a performance hit which is why they're not in the core, but they make life a lot easier IMHO. Jesse
- If my comment is useful, rate me - I can always use the karma! :) Join us on the #webgui irc channel on freenode! (I use the nick Radix)
--- (Edited on 2-March-2007 1:05 pm [GMT+0800] by Jesse) ---
|