[Pmwiki-users] Group/page descriptions
Christian Ridderström
chr
Mon Aug 18 07:35:39 CDT 2003
On 18 Aug 2003, John Rankin wrote:
> We took a slightly different approach to a similar problem. We added
the markup:
>
> [[para:SomeGroup.PageName#anchor]]
>
> If #anchor is omitted, it returns the first paragraph of
SomeGroup.PageName, after stripping off any initial markup characters
like *,#,!,:
Ouch... you don't seem to have any line breaks, that's why the quote of
your message looks so ugly.
Adding the script for this to the cookbook sounds good. But although
'para' is nice and short, it's a bit non-descriptive. This is about
'including' parts of another page, 'include' should be in there. What do
you think of these suggestions?
[[include-paragraph:SomeGroup.PageName#anchor]]
[[includePar:SomeGroup.PageName#anchor]]
[[include-?:SomeGroup.PageName#anchor]]
Using the paragraph symbol, ?, would be nice - I never use that anyway...
(it's on the key to the left of '1' on my keyboard :-)
Or, just augmenting the 'include'-directive with an argument:
[[include:SomeGroup.PageName#anchor paragraph]]
[[include:SomeGroup.PageName#anchor para]]
[[include:SomeGroup.PageName#anchor ?]]]
>
> We also made an in-page version, that's useful for building
cross-references on FAQ pages. It allows authors to pick up the text of a
"Q" and use it to create a link at the top of the page to a paragraph
further down the page. One use for this would be on the
TextFormattingRules page.
>
I'm actually mainly trying to get a FAQ-section up and running, so I'd be
interested in looking at your site - what's the URI?
> This approach could be generalised to include a selected paragraph in a
search results page in 2 ways:
>
> - if a [[#desc]] anchor exists, use that paragraph
>
> - otherwise (optionally) display the first paragraph
Using a anchor to specify the description sounds interesting...
but I'd suggest [[#pageDescription]] instead, since 'desc'/'description'
aren't that uncommon as anchor names already.
Defaulting to the first paragraph when there is no description sounds good
sounds like a pretty good strategy.
/Christian
--
Christian Ridderstr?m, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list