On 27/11/2019 16:01, Petko Yotov wrote:
There is currently no concise/succinct way to configure the output of
Attachlist, you need to override and redefine the whole markup
directive.

This will redefine (:attachlist:) and will work for the pages where this markup is already present (like the default ?action=upload form).

If you prefer, the same way you can define a new markup directive while also keeping the existing one. In that case, change the first and the third argument to the Markup() call:

  Markup('myattachlist', 'directives',
    '/\\(:myattachlist\\s*(.*?):\\)/i',
    "DavidMarkupFmtUploadList");

and in a wiki page use the other directive (:myattachlist:).

See for example in the cookbook how FileList and Attachtable implement it.

Petko

Something like this in config.php:

  Markup('attachlist', 'directives',
    '/\\(:attachlist\\s*(.*?):\\)/i',
    "DavidMarkupFmtUploadList");
  function DavidMarkupFmtUploadList($m) {
    extract($GLOBALS["MarkupToHTML"]); # get $pagename
    return Keep('<ul>'.DavidFmtUploadList($pagename,$m[1]).'</ul>');
  }

  function DavidFmtUploadList($pagename, $args) {
  ## copy here the code from upload.php:FmtUploadList()
  ## and adapt it for your needs.

  }

Petko

On 27/11/2019 15:28, da...@ellendee.co.uk wrote:
Is there any way to configure output from Attachlist. I am especially
interested in supressing file details and would like to reconfigure in the
possible using fmt= with pagelist.

_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to