<div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace"><span style="font-family:arial,sans-serif;font-size:13px">(The solution to use Attach:{$Group}./image.jpg will work for wikis with the default $UploadPrefixFmt, not for you; this solution here should work in both cases of $UploadPrefixFmt.)</span><br>

</div><div class="gmail_default" style="font-family:'courier new',monospace"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div class="gmail_default"><font face="arial, sans-serif">Indeed, thank you for watching Petko ;)</font></div>

<div class="gmail_default"><font face="arial, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, sans-serif">Well, everything that would make pmwiki smarter is welcome (I guess).</font></div><div class="gmail_default">

<font face="arial, sans-serif">Here, it is true it would be nice if pmwiki can handle automagically the basement of included attached files.</font></div><div class="gmail_default"><font face="arial, sans-serif"><br></font></div>

<div class="gmail_default"><font face="arial, sans-serif"><br></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-12 17:53 GMT+02:00 Petko Yotov <span dir="ltr"><<a href="mailto:5ko@5ko.fr" target="_blank">5ko@5ko.fr</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Peter Schwegler writes:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
I have a page, with an attached image. When I view this page directly the image is shown correctly. When I include this page in another page (also in another group) all I see is "Attach:imagename" with the upload triangle.<br>


<br>
original page: group A.page A<br>
this page is included in group B.page B<br>
<br></div><div class="">
I save my uploads in a directory per page ($UploadPrefixFmt='/$Group/$<u></u>Name)<br>
</div></blockquote>
...<div class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What do I need to change to see the image also in page B?<br>
</blockquote>
<br></div>
You can write in PageA.PageA one among:<br>
<br>
 Attach:GroupA.PageA/image.jpg<br>
 Attach:{$FullName}/image.jpg<br>
<br>
Then the image will be displayed in both PageA and PageB.<br>
<br>
(The solution to use Attach:{$Group}./image.jpg will work for wikis with the default $UploadPrefixFmt, not for you; this solution here should work in both cases of $UploadPrefixFmt.)<br>
<br>
It is possible to instruct PmWiki to automatically insert GroupA.PageA when including a page. Something like this in config.php may work:<br>
<br>
 SDV($QualifyPatterns["/(\\[\\[ *Attach:)([^\\/$<u></u>UrlExcludeChars]+(\\|.*?)?\\]\<u></u>\])/"],<br>
   PCCF("\$m[1].\$pagename.'/'.\$<u></u>m[2]", 'qualify'));<br>
 SDV($QualifyPatterns["/\\b(<u></u>Attach:)([^\\s\\/$<u></u>UrlExcludeChars]+(\\s|[$<u></u>UrlExcludeChars]|$))/"],<br>
   PCCF("\$m[1].\$pagename.'/'.\$<u></u>m[2]", 'qualify'));<br>
<br>
This has not been extensively tested but should work in most cases for most attachments (pictures or not) in included pages.<br>
<br>
Maybe I should create a Cookbook recipe and let people test the snippet so we can improve it before eventually include it in the PmWiki core?<span class="HOEnZb"><font color="#888888"><br>
<br>
Petko</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
______________________________<u></u>_________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/<u></u>mailman/listinfo/pmwiki-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><br></div><div>---------------------------------------</div>| A | de la langue française<br>| B | <a href="http://www.languefrancaise.net/" target="_blank">http://www.languefrancaise.net</a><br>

| C | <a href="mailto:languefrancaise@gmail.com" target="_blank">languefrancaise@gmail.com</a><br>---------------------------------------<div>       @bobmonamour</div><div>---------------------------------------</div>
</div>