Short description

<<include>> macro can be used to concatenate information from multiple pages (HelpOnMacros/Include). Furthermore, From and To arguments enable one to include parts of pages that match the keywords specified in From and To. I think it would be nice if this macro could be changed in the following points:

  1. When From or To arguments are specified but no match is found in a page, the macro returns "Nothing found" warning, which I think is unnecessary. If there is no match, the macro should just skip the page.
  2. editlink needs to be displayed only when there is a match.
  3. It would be great if multiple From and To can be used in a page.

1 and 2 can be achieved by modifying the code like this: Include.py

I don't know how to solve the last one. Such function may not be useful for most users, however, I would greatly appreciate if someone could help me with this issue. Thanks. -- TakeoKatsuki

Discussion

Thanks, Can you please also add an unified diff. -- ReimarBauer 2009-06-21 18:48:52

I haven't been able to use Mercurial yet, so until I make out how to generate an unified diff, let me upload the original code and the modified code of Include.py here. Sorry for the inconvenience. IncludeOriginal.py IncludeModified.py -- TakeoKatsuki 2024-11-20 14:31:54


As a general note: please do not expect that Include macro as it exists in moin 1.x will get major changes. I personally consider Include.py as a hack, bad code and rather limited in what it is able to do. Currently most development work is done in some moin/2.0-* repo and the work in the "dom" repo contains new code that will make stuff like Include work much better. Thus, for the old code, we do not want to invest much work or risk new bugs. Well-done bug fixes are welcome, though. -- ThomasWaldmann 2009-06-22 15:44:57


CategoryFeatureRequest

MoinMoin: FeatureRequests/FeatureRequestsIncludeFromTo (last edited 2009-06-22 15:57:55 by TakeoKatsuki)