Everywhere I look on the tutorials, I see the use of URL0 (or 1 or 2 or whatever). Is there any disadvantages of just using "." when referencing? eg: <dtml-call "RESPONSE.redirect('..')"> to go from "users\update\update_user" document to the "users\" folder An interesting point is that if the document is the index_html, you would only use "." rather than ".." eg: <dtml-call "RESPONSE.redirect('.')"> to go from "users\update\" (the index_html of the update folder) to the "users\" folder So, is this a bad way to reference? Is there any advantage in the URLx referencing? Thanks :) SmileyChris
smileych@paradise.net.nz writes:
Everywhere I look on the tutorials, I see the use of URL0 (or 1 or 2 or whatever). Is there any disadvantages of just using "." when referencing? eg: <dtml-call "RESPONSE.redirect('..')"> to go from "users\update\update_user" document to the "users\" folder
An interesting point is that if the document is the index_html, you would only use "." rather than ".." eg: <dtml-call "RESPONSE.redirect('.')"> to go from "users\update\" (the index_html of the update folder) to the "users\" folder
So, is this a bad way to reference? Is there any advantage in the URLx referencing? Like all relative URL (with the exception of the relative URL with an empty path), "." and ".." are resolved with respect to the base URL. Usually, this is the document URL with the last name stripped off. This can be changed with a "base" tag in the HTML "head".
Therefore, usually "." is equivalent to "URL1" and ".." to "URL2". The main difference: "." and ".." are affected by "base" tags, the "URLi" are not. In my view, the "URLi" is therefore easier to grasp. Dieter
participants (2)
-
Dieter Maurer -
smileych@paradise.net.nz