Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

Can I call a wiki-macro from another wiki-macro?

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


ont at uni-c

Nov 4, 2009, 1:37 AM

Post #1 of 7 (532 views)
Permalink
Can I call a wiki-macro from another wiki-macro?

Hi, I have some macros in in "/usr/share/trac/wiki-macros", that has
become standard header for any wiki-page. To facilitate creation of
new pages, I'd like to collect them in a single macro. So instead of:

[[PageOutline]]
[[BackLinksMenu]]
[[Last(5)]]

I can put

[[MyHeader]]

or perhaps

[[MyHeader(5)]]

All this without changing the original macros, as they are still used
as-is.
Can this be done?

Trac v 0.10.3
Python v 2.4.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


olemis at gmail

Nov 4, 2009, 5:48 AM

Post #2 of 7 (514 views)
Permalink
Re: Can I call a wiki-macro from another wiki-macro? [In reply to]

On Wed, Nov 4, 2009 at 4:37 AM, ole.nomann <ont [at] uni-c> wrote:
>
> Hi, I have some macros in in "/usr/share/trac/wiki-macros", that has
> become standard header for any wiki-page. To facilitate creation of
> new pages, I'd like to collect them in a single macro. So instead of:
>
> [[PageOutline]]
> [[BackLinksMenu]]
> [[Last(5)]]
>
> I can put
>
> [[MyHeader]]
>
> or perhaps
>
> [[MyHeader(5)]]
>
> All this without changing the original macros, as they are still used
> as-is.
> Can this be done?
>

Yes ! But you'll need to write some code ...

Example : In TracGViz plugin [1]_ GadgetAlias macro reuses iGoogleGadget macro

;o)

.. [1] TracGViz plugin
(https://opensvn.csie.org/traccgi/swlcu/wiki/En/Devel/TracGViz)

.. [2] TracGViz plugin - Download
(http://pypi.python.org/pypi/TracGViz)

.. [3] iGoogleGadgetMacro & GadgetAliasMacro
(https://opensvn.csie.org/traccgi/swlcu/pydoc/tracgviz.ig.wiki)

--
Regards,

Olemis.

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


yoheeb at gmail

Nov 6, 2009, 1:23 PM

Post #3 of 7 (506 views)
Permalink
Re: Can I call a wiki-macro from another wiki-macro? [In reply to]

On Nov 4, 7:48 am, Olemis Lang <ole...@gmail.com> wrote:
> On Wed, Nov 4, 2009 at 4:37 AM, ole.nomann <o...@uni-c.dk> wrote:
>
> > Hi, I have some macros in in "/usr/share/trac/wiki-macros", that has
> > become standard header for any wiki-page. To facilitate creation of
> > new pages, I'd like to collect them in a single macro. So instead of:
>
> > [[PageOutline]]
> > [[BackLinksMenu]]
> > [[Last(5)]]
>
> > I can put
>
> > [[MyHeader]]
>
> > or perhaps
>
> > [[MyHeader(5)]]
>
> > All this without changing the original macros, as they are still used
> > as-is.
> > Can this be done?
>
> Yes ! But you'll need to write some code ...
>
> Example : In TracGViz plugin [1]_ GadgetAlias macro reuses iGoogleGadget macro
>
> ;o)
>
> .. [1] TracGViz plugin
>         (https://opensvn.csie.org/traccgi/swlcu/wiki/En/Devel/TracGViz)
>
> .. [2] TracGViz plugin - Download
>         (http://pypi.python.org/pypi/TracGViz)
>
> .. [3] iGoogleGadgetMacro & GadgetAliasMacro
>         (https://opensvn.csie.org/traccgi/swlcu/pydoc/tracgviz.ig.wiki)
>
> --
> Regards,
>
> Olemis.
>
> Blog ES:http://simelo-es.blogspot.com/
> Blog EN:http://simelo-en.blogspot.com/
>
> Featured article:

I thought by default wiki macros could call other macros.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


yoheeb at gmail

Nov 6, 2009, 1:26 PM

Post #4 of 7 (508 views)
Permalink
Re: Can I call a wiki-macro from another wiki-macro? [In reply to]

On Nov 6, 3:23 pm, yoheeb <yoh...@gmail.com> wrote:
> On Nov 4, 7:48 am, Olemis Lang <ole...@gmail.com> wrote:
>
>
>
> > On Wed, Nov 4, 2009 at 4:37 AM, ole.nomann <o...@uni-c.dk> wrote:
>
> > > Hi, I have some macros in in "/usr/share/trac/wiki-macros", that has
> > > become standard header for any wiki-page. To facilitate creation of
> > > new pages, I'd like to collect them in a single macro. So instead of:
>
> > > [[PageOutline]]
> > > [[BackLinksMenu]]
> > > [[Last(5)]]
>
> > > I can put
>
> > > [[MyHeader]]
>
> > > or perhaps
>
> > > [[MyHeader(5)]]
>
> > > All this without changing the original macros, as they are still used
> > > as-is.
> > > Can this be done?
>
> > Yes ! But you'll need to write some code ...
>
> > Example : In TracGViz plugin [1]_ GadgetAlias macro reuses iGoogleGadget macro
>
> > ;o)
>
> > .. [1] TracGViz plugin
> >         (https://opensvn.csie.org/traccgi/swlcu/wiki/En/Devel/TracGViz)
>
> > .. [2] TracGViz plugin - Download
> >         (http://pypi.python.org/pypi/TracGViz)
>
> > .. [3] iGoogleGadgetMacro & GadgetAliasMacro
> >         (https://opensvn.csie.org/traccgi/swlcu/pydoc/tracgviz.ig.wiki)
>
> > --
> > Regards,
>
> > Olemis.
>
> > Blog ES:http://simelo-es.blogspot.com/
> > Blog EN:http://simelo-en.blogspot.com/
>
> > Featured article:
>
> I thought by default wiki macros could call other macros.

Although in this case, you probably can use the include macro easier.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


ryano at physiosonics

Nov 9, 2009, 4:53 PM

Post #5 of 7 (484 views)
Permalink
Re: Can I call a wiki-macro from another wiki-macro? [In reply to]

On Nov 4, 1:37 am, "ole.nomann" <o...@uni-c.dk> wrote:
> To facilitate creation of new pages, I'd like to collect them in a single macro.

In case you are not already aware, PageTemplates may be of use to you:
http://trac.edgewall.org/wiki/PageTemplates
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


ont at uni-c

Nov 10, 2009, 3:00 AM

Post #6 of 7 (491 views)
Permalink
Re: Can I call a wiki-macro from another wiki-macro? [In reply to]

On Nov 6, 10:26 pm, yoheeb <yoh...@gmail.com> wrote:
> On Nov 6, 3:23 pm, yoheeb <yoh...@gmail.com> wrote:
>
> > I thought by default wiki macros could call other macros.
>
> Although in this case, you probably can use the include macro easier.

Maybe so, but I how? I tried putting ttt.py in wiki-macros/ containing

Return Last(5)

But that won't compile.

(I'm really no Python programmer, så please "cookbook me" if possible)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


ont at uni-c

Nov 10, 2009, 3:00 AM

Post #7 of 7 (488 views)
Permalink
Re: Can I call a wiki-macro from another wiki-macro? [In reply to]

On Nov 10, 1:53 am, RjOllos <ry...@physiosonics.com> wrote:
> On Nov 4, 1:37 am, "ole.nomann" <o...@uni-c.dk> wrote:
>
> > To facilitate creation of new pages, I'd like to collect them in a single macro.
>
> In case you are not already aware, PageTemplates may be of use to you:http://trac.edgewall.org/wiki/PageTemplates

Pretty neat, yeah. But not in v0.10.3
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.