Mailing List Archive

Macro for current wiki title
Hi,

we are working with many Sub Wikis, like
http://trac/service/customers/foobar/contact

On every level I like to create a template which should be quite generic
like this one:

==== [wiki:Service/Customers/Foobar]
{{{#!box
[[TitleIndex(./,hideprefix,format=compact,depth=0)]]
}}}

The TitleIndex Macro is already generic and shows all subwikis of the next
level by using ./.
Is there any way to generate a generic title showing the current path?
That would mean I can create all the generic wikis just by creating from
template and saving.
Any idea?

Best regards, Mo

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/86a52069-da21-407b-8826-14f4ef3e4e9dn%40googlegroups.com.
Re: Macro for current wiki title [ In reply to ]
On Thursday, October 7, 2021 at 12:03:45 AM UTC-7 Mo wrote:

>
> Hi,
>
> we are working with many Sub Wikis, like
> http://trac/service/customers/foobar/contact
>
> On every level I like to create a template which should be quite generic
> like this one:
>
> ==== [wiki:Service/Customers/Foobar]
> {{{#!box
> [[TitleIndex(./,hideprefix,format=compact,depth=0)]]
> }}}
>
> The TitleIndex Macro is already generic and shows all subwikis of the next
> level by using ./.
> Is there any way to generate a generic title showing the current path?
> That would mean I can create all the generic wikis just by creating from
> template and saving.
> Any idea?
>
> Best regards, Mo
>

Creating a macro of WikiProcessor would be fairly straightforward. Wikinfo
macro would be a good example to follow:

https://trac-hacks.org/wiki/WikinfoPlugin

Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/9905f220-6d01-4905-b793-879db464d89fn%40googlegroups.com.