When I worked on kckcc.edu, we had a pretty deep structure in some 
places.  If I wanted quasi-relative URLs I took to using <r:url/> or 
<r:parent:url/> where necessary to cut down the typing errors.

Sean

Chris Parrish wrote:
> Mislav Marohni�? wrote:
>   
>> On 6/12/07, Chris Parrish <[EMAIL PROTECTED]> wrote:
>>     
>>> However, if in page A I have a relative link: <a href="b">, the target
>>> page depends on the address used.  In the first case, I will be directed
>>> to http://root/b because the browser thinks I'm in the root/ folder.  In
>>> the second case, I'm sent to http://root/a/b because it thinks I'm in
>>> the root/a/ folder.
>>>       
>> This is normal behavior and not something you can "fix".
>>
>> Simply normalize your URLs - choose a convention for trailing slashes 
>> and
>> stick to it.
>>     
>
> The problem with this approach is two-fold:
> 1.)  People make mistakes and if my convention is to always link to page 
> A as 'root/a/' and some time down the road, a writer mistakenly links to 
> that page as 'root/a' their link will still appear to work.  It wouldn't 
> be apparent to them, however, that they just broke all the relative 
> links inside page A.  In a traditional website, this could never happen 
> -- the writer would have immediate feedback that their link to page A is 
> wrong.
>
> 2.)  Even if I could foolproof (enforce) #1, I would still have cases 
> where the user may manually type the URL (either marketing materials 
> tell them to go to: 'www.website.com/path' or someone guides them via 
> phone).  Again, no matter which way they type it,everything will appear 
> to work to them... until they follow links.  And then they just think my 
> site is broken.
>
> The only way I think that this premise could work is if you could tell 
> Radiant to enforce a trailing slash on all pages (or no trailing slash 
> on all pages).  That way if the user typed (or a link sent them to) 
> 'www.website.com/root/a' Radiant would automatically redirect to 
> 'www.website.com/root/a/'
>
> Then a writer could be sure that their pages would work as intended no 
> matter how the user got there.
>
> I'm not sure everyone would want this convention or would agree to which 
> way it should work (always or never a slash).  Perhaps it could be 
> configurable.  Thoughts anyone?
>
>   

_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to