[pmwiki-users] PTV including directive : (:text: this is my long text, with pictures. (:thumlist:):)
ABClf
languefrancaise at gmail.com
Sat Aug 14 03:34:41 CDT 2010
Hi Dave,
In fact, I found another solution : I write my (:thumblist quiet=3:)
directive outside the (:ptv:my text:) because it is more efficient. No need
to say, for every page, if there is an image to print or not and no need to
wirte a new markup.
This said, thank your for your help. I didn't know one can change the format
how PTV are declared.
Could you give me some light about your suggestion ? That may help for
another time.
instead of :
(:text:mytext with {$:image}:) // where image:(:thumblist:), (:y:xxx:)
broken by :)
have (for example) :
<:text:mytext with {$:image}:> // where image:(:thumblist:), <:y:xxx:> not
broken by :)
Isn't it ?
If so, what would be the new requested markup (to get <:y:xxx:> ?
Original markup is (as seen in Mailing List) :
(:var:...:)' => '/(\\(: *(\\w[-\\w]*) *:(?!\\))\\s?)(.*?)(:\\))/s'
Should I translate in :
<:var:...:>' => '/(\\<: *(\\w[-\\w]*) *:(?!\\))\\s?)(.*?)(:\\>)/s'
?
Then, in config, write :
$PageTextVarPatterns['<:var:...:>'] = '/(\\<: *(\\w[-\\w]*)
*:(?!\\))\\s?)(.*?)(:\\>)/s'; #[1]
Thank you.
2010/8/14 DaveG <pmwiki at solidgone.com>
>
> On 8/13/2010 6:42 PM, ABClf wrote:
>
>> In some PTV, (:text: this is my long [[link|text]]:) I see I got trouble
>> when I want to include a directive as (:thumblist:) -> because of the :)
>> Real example here :
>>
>> http://www.languefrancaise.net/Info/2008-10-27-Simonin-dans-les-collections-de-la-BNF:
>> part of the text is duplicated ; cause in (:text: my long text:) I
>> insert a {$:images} where images:(:thumblist:)
>>
>> Is there any trick to solve this (nested ptv?) ?
>>
>> I guess I could put the (:thumblist:) directive elsewhere in my
>> template, out of the long text PTV, so it isn't very crucial in this
>> case, but if there were any easy solution, I would like using it.
>>
> If I understand correctly, you could create an additional markup to define
> PTVs. Sample from blogit:
>
> $PageTextVarPatterns['[[#anchor]]'] = '/(\[\[#blogit_(\w[_-\w]*)\]\](?:
> *\n)?)(.*?)(\[\[#blogit_\2end\]\])/s'; #[1]
>
> That way, it doesn't get mixed up with the embedded markup.
>
>
> ~ ~ Dave
>
--
---------------------------------------
| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com
---------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100814/53079e66/attachment.html>
More information about the pmwiki-users
mailing list