[support] how to handle internal links
Bèr Kessels
ber at webschuur.com
Wed Jul 5 10:27:23 UTC 2006
Op dinsdag 4 juli 2006 23:14, schreef Ray Zimmerman:
> Any other possibilities?
I advice you to not use "hardcoded" links at all. Look at some filters like
title-filter, interwiki or so. The links package (links module) has other
nice links handling tools for you.
That way you only store references to links (reference to the data) and not
the links themselves (embedded data).
IMO it is a bad practice to hardcode "stuff" like links, images, quotes, etc
inside a node. These are 'metadata' things. Hence should live in a separate
place.
More pragmatic: If you have references to the data, that gets turned into real
links (like [link:134]) and you choose to change your internal url scheme
(pathauto) or you move your server (I recently moved from www.foobar/ to
foobar/ and had to preg-replace thousands of entries) your code will take
care of that change.
Bèr
More information about the support
mailing list