- Importing images from subfolders in lowerfolders fails
I have a folder heirarchy like this / Air Links index_html I have an image in /Air called PlaneImage In /Air/Links/index_html I have <!--#var PlaneImage--> The resulting output HTML is <IMG SRC="PlaneImage" ALT="Small Airplane Image"> However, since PlaneImage is defined in /Air, shouldn't this really be <IMG SRC="Air/PlaneImage" ALT="Small Airplane Image"> I'm wondering if I'm using the #var wrong, or if this is a "bug". I'll have to hand-code all of my images if I can't get this to work. What is the var for "path to myself", is in, in index_html above I want to get "Air/Links" as the path, and "index_html" as the document name. To work around this problem, I've defined a property in /Air called "baseref" and set it to http://myhost.com:9673/Air" Then all of my URLS are constructed using <!--#var baseref-->, but it's rather labor intensive.. Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com ICQ: 14856937 We must come down from our heights, and leave our straight paths, for the byways and low places of life, if we would learn truths by strong contrasts; and in hovels, in forecastles, and among our own outcasts in foreign lands, see what has been wrought upon our fellow-creatures by accident, hardship, or vice. - Richard Henry Dana, Jr. 1836
On Fri, Jan 15, 1999 at 11:35:13AM -0500, Brad Clements wrote:
[ discusses the problems with image insertion and acquisition ]
Actually, what I've been thinking about, and just have to find some time to implement (isn't that always the problem), since I have to write tons of Python for work too... is a #ref tag... Basically, #ref would come in a few forms: <!--#ref imageName--> This would give you the absolute URL where the object is stored, regardless of how it's been acquired... <!--#ref imageName fmt="relative"--> This would give you the RELATIVE URL to your current position in the "hierarchy". <!--#ref imageName fmt="acquire"--> This would give yo uthe acquired location :-) This would behave largely identical to the current #var tag.. I'v not looked at how to extend DTML, though wouldn't it be nice to have DTML go through it's default tags, and if it can't find anything, maybe use __dtml_ref__ on the object? Just a wacko though. Chris -- | Christopher Petrilli | petrilli@amber.org
"Christopher G. Petrilli" wrote:
On Fri, Jan 15, 1999 at 11:35:13AM -0500, Brad Clements wrote:
[ discusses the problems with image insertion and acquisition ]
Actually, what I've been thinking about, and just have to find some time to implement (isn't that always the problem), since I have to write tons of Python for work too... is a #ref tag...
Basically, #ref would come in a few forms:
<!--#ref imageName-->
This would give you the absolute URL where the object is stored, regardless of how it's been acquired...
<!--#ref imageName fmt="relative"-->
This would give you the RELATIVE URL to your current position in the "hierarchy".
<!--#ref imageName fmt="acquire"-->
This would give yo uthe acquired location :-) This would behave largely identical to the current #var tag..
I'v not looked at how to extend DTML, though wouldn't it be nice to have DTML go through it's default tags, and if it can't find anything, maybe use __dtml_ref__ on the object? Just a wacko though.
This doesn't need a new tag. We plan, for 1.10 to provide an API for getting an absolute URL for an object. For example, you'll be able to do something like: <!--#var someobject fmt=ZAbsoluteURL--> We also plan to modify image objects so that they use this URL when generating IMG tags. BTW, we also plan to provide standard size attributes for images and to include this information in generated IMG tags when available. We plan to use the code contributed by Ty Sarna to determine image dimensions when possible and we plan to let you edit image sizes. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (888) 344-4332 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Jim Fulton wrote:
BTW, we also plan to provide standard size attributes for images and to include this information in generated IMG tags when available. We plan to use the code contributed by Ty Sarna to determine image dimensions when possible and we plan to let you edit image sizes.
Great! But, I need to send you folks a new version of that. I tried changing the title on a File object recently and got an error from my changes. I must have been asleep when I wrote that code, because I put some of the stuff into File's methods instead of in Image where it belongs...
participants (4)
-
Brad Clements -
Christopher G. Petrilli -
Jim Fulton -
Ty Sarna