[pmwiki-users] Markup for linking to page with a "unique" identifier

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Sun Aug 12 12:59:30 CDT 2007


On Sun, 12 Aug 2007, Frank Graffagnino wrote:

>> * 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=#... :)


>> * 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?

> 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?

I think using a PTV for accessing the id is a good idea, i.e. I like the 
thoght of doing:
 	(:pagelist $:pagetagid="id" fmt=#... :)

I'm not sure ctime is a good unique id though, a bit long for one. But 
perhaps wiki pages could get a unique while being created.... OTOH, if an 
administrator manually copies a wiki page, the id will be copied as well.
There's nothing we can do to prevent that, but it should at least be 
possible to change the id of page - either by edting the page, or by 
editing some page attribute.

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr


More information about the pmwiki-users mailing list