> Date: Sat, 11 Aug 2007 23:27:16 +0200 > From: [EMAIL PROTECTED] > Subject: [pmwiki-users] Markup for linking to page with a "unique" > identifier > To: [email protected] > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > > A user (actually Jose', a LyX developer) asked me about renaming pages and > automatically having links to the renamed page working. He suggested that > pages should have some ID (or label) that you could refer to rather than > linking to the name of the page. > > I replied that this is already possible by using (:pagelist ...:). It can > be done as follows: > > * Insert a marker/label/tag on the destination page. It could e.g. be as > follows: > (:comment tag_some-id :) > > * To link to that page, use something like: > (:pagelist "tag_some-id" fmt=#... :) > > As long as the "tag" stays on the page, the pagelist markup will find it > even if the page is renamed. In theory this seems nice, but are there some > drawbacks here? > > * Perfomance? What happens if something like is used extensively? > > * Uniqueness of id:s? Maybe a mechanism is needed to help keep the id:s > unique? > > * Maybe a simpler/clearer markup would be useful? > > Thoughts? > > Best regards, > Chrstian > > -- > Christian Ridderstr?m, +46-8-768 39 44 http://www.md.kth.se/~chr >
I have a couple of suggestions. One would be to use a unique pagetext variable to store the unique id. Then the pagelist would become: (:pagelist $:pagetagid="tag_some-id" fmt=#... :) the ensures that a pagetext variable called "pageid" is defined as well. For uniqueness, if you were going to automate it... perhaps the ctime of the page would be sufficient? FG _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
