I recently implemented GUID links to pages, if you use midgard from CVS you already have it. see attached documentation.
David
Hello,
If I'm in a page and I want to place an "internal" link to another page somewhere else in the site structure... how do I do that?
If I use a full URL then if I move my page I have to replace the link again. Any alternatives ?
Thanks, Marianne
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- David Schmitter, CMS Developer, [EMAIL PROTECTED] Dataflow Solutions GmbH - Pappelweg 48 - 3013 CH-Bern [EMAIL PROTECTED] - +41 31 332 01 01
Copyright (C) 2003 David Schmitter, Dataflow Solutions GmbH <[EMAIL PROTECTED]>
GUID links ********** Make hypertext links that still work if the target is renamed or moved. Installation ------------ Included in libmidgard + midgard-php4. Link syntax ----------- 1. <A> <a href="guid://ffffffffffffffffffffffffffffffff" other-attr="attr-value" ... >label</a> if it is a page (has to be on the same host), gets rewritten to: <a href="http://host/prefix/link/to/page" other-attr="attr-value" ... >label</a> if it is an attachment: <a href="http://host/prefix/serveattachment/attachment-guid" other-attr="attr-value" ... >label</a> (see Automatic attachment hosts) if it is none of both: empty string 2. <IMG> <img src="guid://ffffffffffffffffffffffffffffffff[/image.jpg]" other-attr="attr-value" ... > gets rewritten to: <img src="http://host/prefix/serveattachment/attachment-guid[/image.jpg]" other-attr="attr-value" ... /> Function reference ------------------ New preparser function: mgd_ref(int mode, string guid, string attr, [string label]) where mode is 0: <A> link, 1: <IMG> link Preparser enhancement --------------------- <a href="guid://ffffffffffffffffffffffffffffffff" other-attr="attr-value" ... >label</a> is recognized by the preparser and rewritten to <?=mgd_ref(0, "ffffffffffffffffffffffffffffffff", 'other-attr="attr-value" ... ', 'label')?> This means it calls the mgd_ref function which then outputs the final, browser-readable form of the link.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
