[pmwiki-users] pagelist question

Pico pmwiki at ben-amotz.com
Sat Oct 28 08:25:32 CDT 2006

Hans wrote:
> In the Cookbook recipeinfo section
> Download: Attach:filename.ext
> will display filename.ext as a link for downloading.
> How can I achieve the same in a pagelist custom format?
> {=$:Download} will display as Attach:filename.ext, but not as a link.
> [[{=$:Download}]] produces links for editing new pages of form
> AttachFilename.Ext, AttachFileName as group name and Ext as Page
> name!! Do I need to extract the actual filename first? But how?
> And since the pagelist works from a page in a different group
> I would in any case need to add the Cookbook group to the Attach, like
> Attach:Cookbook/filename.ext, but that will display as
> Cookbook/filename.ext in the recipeinfo section.
> Can one hide the Coookbook/ part?
> And it still does not work in a pagelist.
I believe that Pm mentioned in one of his early posts that the colon in 
Attach:filename.ext would make Attach available as a PageTextVariable. 
So, I would try {$:Attach}, generally, and {=$:Attach} in a pagelist 
iteration, and wrap it with whatever else you need in your template:

[[Attach:{=$:Attach}]]  or
[[Attach:Cookbook/{=$:Attach}]]  or
[[Attach:{=$Group}/{=$:Attach}]]  or

Note: If your recipe page contains more than one instance of the same 
PageTextVariable, in this case "Attach:", I believe that only the last 
one gets picked up (that is, the one that appears furthest down on the 

Question: Is there a way to iterate over a page to pickup all instances 
of a given PageTextVariable, in this case, Attach:   If not, is there a 
real need for that?



         __  /
        /   /
       /___/ _/  ___/  __  /
      /      /  /     /   /
    _/     _/  ____/ ____/

 >>>===pmwiki at ben-amotz.com===>

More information about the pmwiki-users mailing list