Mailing List Archive

Custom Main Menu item and inherited conf
Hi all,

I have a few 'tracs running that have there own trac.ini but inherit a few
things from a global config.

So in the global config i define my mainnav under [trac] and tha works just
fine, Now i want to add a custom menu item in one of my tracs and define it
in the local trac.ini of the project

cloud = enable
cloud.order = 1.0
cloud.href = https://url/to/the/cloud
cloud.label = Nextcloud
cloud.permission = TRAC_ADMIN

so now i want to show up but since i inherit the mainnav form the global
conf its not showing.
I try to redefine my mainnav entry in the local ini under [trac] but it
doesnt work my new item isnt rendered.

so questions are:

- can i extend mainnav from an inherited conf ?
- If its possible, how ?

Cheers

Markus

--
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/CAJ4osOkXHZrP6ypreyb1tKcuvtcFZ616SwJqGYz0F4HMyOKgAg%40mail.gmail.com.
Re: Custom Main Menu item and inherited conf [ In reply to ]
On Monday, February 21, 2022 at 2:44:44 AM UTC-8 markus...@gmail.com wrote:

> Hi all,
>
> I have a few 'tracs running that have there own trac.ini but inherit a few
> things from a global config.
>
> So in the global config i define my mainnav under [trac] and tha works
> just fine, Now i want to add a custom menu item in one of my tracs and
> define it in the local trac.ini of the project
>
> cloud = enable
> cloud.order = 1.0
> cloud.href = https://url/to/the/cloud
> cloud.label = Nextcloud
> cloud.permission = TRAC_ADMIN
>
> so now i want to show up but since i inherit the mainnav form the global
> conf its not showing.
> I try to redefine my mainnav entry in the local ini under [trac] but it
> doesnt work my new item isnt rendered.
>
> so questions are:
>
> - can i extend mainnav from an inherited conf ?
> - If its possible, how ?
>
> Cheers
>
> Markus
>

Which Trac version are you running? I think we added the ability for the
code to merge config-sections from a parent, but I'll have to check if/when
that was done.

--
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/c2324b98-de70-4d29-a5e3-18e847c3e32en%40googlegroups.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
hi,

I am running 1.4.2 here

Am Di., 22. Feb. 2022 um 17:24 Uhr schrieb RjOllos <rjollos@gmail.com>:

>
>
> On Monday, February 21, 2022 at 2:44:44 AM UTC-8 markus...@gmail.com
> wrote:
>
>> Hi all,
>>
>> I have a few 'tracs running that have there own trac.ini but inherit a
>> few things from a global config.
>>
>> So in the global config i define my mainnav under [trac] and tha works
>> just fine, Now i want to add a custom menu item in one of my tracs and
>> define it in the local trac.ini of the project
>>
>> cloud = enable
>> cloud.order = 1.0
>> cloud.href = https://url/to/the/cloud
>> cloud.label = Nextcloud
>> cloud.permission = TRAC_ADMIN
>>
>> so now i want to show up but since i inherit the mainnav form the global
>> conf its not showing.
>> I try to redefine my mainnav entry in the local ini under [trac] but it
>> doesnt work my new item isnt rendered.
>>
>> so questions are:
>>
>> - can i extend mainnav from an inherited conf ?
>> - If its possible, how ?
>>
>> Cheers
>>
>> Markus
>>
>
> Which Trac version are you running? I think we added the ability for the
> code to merge config-sections from a parent, but I'll have to check if/when
> that was done.
>
> --
> 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/c2324b98-de70-4d29-a5e3-18e847c3e32en%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/c2324b98-de70-4d29-a5e3-18e847c3e32en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
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/CAJ4osOn8epSucb4mp0_4ssD7ptg%3DFgAzJ77eSmYRFQVe3C9cOg%40mail.gmail.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
On Tuesday, February 22, 2022 at 8:36:16 AM UTC-8 markus...@gmail.com wrote:

> hi,
>
> I am running 1.4.2 here
>

I tested with Trac 1.4-stable. The [ticket-custom] section of the inherited
config file is merged with the base config.

trac.ini:

[inherit]
file = parent.ini

[ticket-custom]
datetime2 = time

parent.ini:

[ticket-custom]
datetime = time
parents = text
parents.label = Parent tickets
project.options =



--
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/7fc06f79-7082-4b35-9ad8-26e91b579041n%40googlegroups.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
Hey,

Well i want to show a Menu item not a custom field in a Ticket. I know that
this works since i use custom fields in Tickets.

Cheers

Markus

RjOllos <rjollos@gmail.com> schrieb am Sa., 9. Apr. 2022, 18:43:

>
>
> On Tuesday, February 22, 2022 at 8:36:16 AM UTC-8 markus...@gmail.com
> wrote:
>
>> hi,
>>
>> I am running 1.4.2 here
>>
>
> I tested with Trac 1.4-stable. The [ticket-custom] section of the
> inherited config file is merged with the base config.
>
> trac.ini:
>
> [inherit]
> file = parent.ini
>
> [ticket-custom]
> datetime2 = time
>
> parent.ini:
>
> [ticket-custom]
> datetime = time
> parents = text
> parents.label = Parent tickets
> project.options =
>
>
>
> --
> 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/7fc06f79-7082-4b35-9ad8-26e91b579041n%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/7fc06f79-7082-4b35-9ad8-26e91b579041n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
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/CAJ4osO%3DxxJ1oNToOs03H3ChtuDZkSLR_vFB1xOBP4zabyNChGQ%40mail.gmail.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
On Saturday, April 9, 2022 at 9:46:46 AM UTC-7 markus...@gmail.com wrote:

> Hey,
>
> Well i want to show a Menu item not a custom field in a Ticket. I know
> that this works since i use custom fields in Tickets.
>
> Cheers
>
> Markus
>

You can't extend [trac] mainnav, but you can override it. This should
definitely work:
> I try to redefine my mainnav entry in the local ini under [trac] but it
doesnt work my new item isnt rendered.

--
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/624916bf-e0ff-4a25-a6be-543ee5195095n%40googlegroups.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
On Saturday, April 9, 2022 at 9:58:13 AM UTC-7 RjOllos wrote:

> On Saturday, April 9, 2022 at 9:46:46 AM UTC-7 markus...@gmail.com wrote:
>
>> Hey,
>>
>> Well i want to show a Menu item not a custom field in a Ticket. I know
>> that this works since i use custom fields in Tickets.
>>
>> Cheers
>>
>> Markus
>>
>
> You can't extend [trac] mainnav, but you can override it. This should
> definitely work:
> > I try to redefine my mainnav entry in the local ini under [trac] but it
> doesnt work my new item isnt rendered.
>

Oh wait, sorry I forgot that we replaced [trac] mainnav with the [mainnav]
section. There's not [trac] mainnav option in Trac in Trac 1.4.

The mainnav items are fully defined through the mainnav section.

--
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/ab3d4e62-7c04-4533-b162-d86e881ffa7en%40googlegroups.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
Yeah but then I will leave it since it will cause to much redundance.

Thanks for the Info

Cheers

Markus

RjOllos <rjollos@gmail.com> schrieb am Sa., 9. Apr. 2022, 19:00:

>
>
> On Saturday, April 9, 2022 at 9:46:46 AM UTC-7 markus...@gmail.com wrote:
>
>> Hey,
>>
>> Well i want to show a Menu item not a custom field in a Ticket. I know
>> that this works since i use custom fields in Tickets.
>>
>> Cheers
>>
>> Markus
>>
>
> You can't extend [trac] mainnav, but you can override it. This should
> definitely work:
> > I try to redefine my mainnav entry in the local ini under [trac] but it
> doesnt work my new item isnt rendered.
>
> --
> 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/624916bf-e0ff-4a25-a6be-543ee5195095n%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/624916bf-e0ff-4a25-a6be-543ee5195095n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
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/CAJ4osOkWK39LLYws69e-%2BELO5Pzg8Ru8P2prh3cQ6G%2B%2BrdNm1g%40mail.gmail.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
On Saturday, April 9, 2022 at 10:02:19 AM UTC-7 markus...@gmail.com wrote:

> Yeah but then I will leave it since it will cause to much redundance.
>
> Thanks for the Info
>
> Cheers
>
> Markus
>

I might be missing your point, but you can define the options for [mainnav]
shared among all of your Trac instances in the parent.ini and then override
or extend those options in the base trac.ini.

If you have this in [mainnav] of your trac.ini:
cloud = enable
cloud.order = 1.0
cloud.href = https://url/to/the/cloud
cloud.label = Nextcloud
cloud.permission = TRAC_ADMIN

It should get merged with the [mainnav] from the inherited config file.

--
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/841f2ad8-9874-4485-86f8-c4760b1555cen%40googlegroups.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
Its the other way around, this is my section in one of my project ini files
that inherites tue Main ini file . But as i explained this doesnt seem to
work

RjOllos <rjollos@gmail.com> schrieb am Sa., 9. Apr. 2022, 19:05:

>
>
> On Saturday, April 9, 2022 at 10:02:19 AM UTC-7 markus...@gmail.com wrote:
>
>> Yeah but then I will leave it since it will cause to much redundance.
>>
>> Thanks for the Info
>>
>> Cheers
>>
>> Markus
>>
>
> I might be missing your point, but you can define the options for
> [mainnav] shared among all of your Trac instances in the parent.ini and
> then override or extend those options in the base trac.ini.
>
> If you have this in [mainnav] of your trac.ini:
> cloud = enable
> cloud.order = 1.0
> cloud.href = https://url/to/the/cloud
> cloud.label = Nextcloud
> cloud.permission = TRAC_ADMIN
>
> It should get merged with the [mainnav] from the inherited config file.
>
> --
> 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/841f2ad8-9874-4485-86f8-c4760b1555cen%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/841f2ad8-9874-4485-86f8-c4760b1555cen%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
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/CAJ4osOnGGquXmU5O0uQ0CPO%2BNTivz0ibFOO9ZPX7PrSBgZcccg%40mail.gmail.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
On Saturday, April 9, 2022 at 10:10:30 AM UTC-7 markus...@gmail.com wrote:

> Its the other way around, this is my section in one of my project ini
> files that inherites tue Main ini file . But as i explained this doesnt
> seem to work
>

I don't know if I'm just not getting what you are saying, but I did some
testing and [mainnav] inheritance seems to work fine.

--
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/62b3c0b2-94a8-4f5c-8fdb-05e254ca692en%40googlegroups.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
No worries, if you like just Post the Part of the Main ini and the Part of
the ini that inherites from it and the externes the mainnav there. I guess
then i can figure it out

RjOllos <rjollos@gmail.com> schrieb am Sa., 9. Apr. 2022, 19:28:

>
>
> On Saturday, April 9, 2022 at 10:10:30 AM UTC-7 markus...@gmail.com wrote:
>
>> Its the other way around, this is my section in one of my project ini
>> files that inherites tue Main ini file . But as i explained this doesnt
>> seem to work
>>
>
> I don't know if I'm just not getting what you are saying, but I did some
> testing and [mainnav] inheritance seems to work fine.
>
> --
> 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/62b3c0b2-94a8-4f5c-8fdb-05e254ca692en%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/62b3c0b2-94a8-4f5c-8fdb-05e254ca692en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
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/CAJ4osOk8S9_UymEs7f8wYo%3DvtnsHCynSQ_eFcN77JFuqw-bWig%40mail.gmail.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
On Saturday, April 9, 2022 at 10:32:04 AM UTC-7 markus...@gmail.com wrote:

> No worries, if you like just Post the Part of the Main ini and the Part of
> the ini that inherites from it and the externes the mainnav there. I guess
> then i can figure it out
>

I put the default in the parent.ini:
[mainnav]
admin.order = 8.0
browser.order = 4.0
newticket.order = 6.0
roadmap.order = 3.0
search.order = 7.0
tickets.order = 5.0
wiki.order = 1.0

Then in the project trac.ini
[mainnav]
wiki.order = 3.1
timeline.order = 0.1

And wiki.order from the project overrides the parent, and timeline extends
it, so the ordering for TRAC_ADMIN is:

[image: Screen Shot 2022-04-09 at 11.33.18.jpg]

But removing [mainnav] from the project trac.ini yields:

[image: Screen Shot 2022-04-09 at 11.33.31.jpg]

--
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/50a949d0-f7a2-49ea-9b3c-fcd6c03337bbn%40googlegroups.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
Yeah thats how i do it just with a custom Henry but mine doesnt get
displayed. I guess this only works for Standard items like the one in your
example.

Thanks for the example

Cheers

Markus

RjOllos <rjollos@gmail.com> schrieb am Sa., 9. Apr. 2022, 20:35:

>
>
> On Saturday, April 9, 2022 at 10:32:04 AM UTC-7 markus...@gmail.com wrote:
>
>> No worries, if you like just Post the Part of the Main ini and the Part
>> of the ini that inherites from it and the externes the mainnav there. I
>> guess then i can figure it out
>>
>
> I put the default in the parent.ini:
> [mainnav]
> admin.order = 8.0
> browser.order = 4.0
> newticket.order = 6.0
> roadmap.order = 3.0
> search.order = 7.0
> tickets.order = 5.0
> wiki.order = 1.0
>
> Then in the project trac.ini
> [mainnav]
> wiki.order = 3.1
> timeline.order = 0.1
>
> And wiki.order from the project overrides the parent, and timeline extends
> it, so the ordering for TRAC_ADMIN is:
>
> [image: Screen Shot 2022-04-09 at 11.33.18.jpg]
>
> But removing [mainnav] from the project trac.ini yields:
>
> [image: Screen Shot 2022-04-09 at 11.33.31.jpg]
>
> --
> 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/50a949d0-f7a2-49ea-9b3c-fcd6c03337bbn%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/50a949d0-f7a2-49ea-9b3c-fcd6c03337bbn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
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/CAJ4osOkTkJbZsvwWwzEuiUan9Hx-NTh8M9M7tj_3fP0Sxr277Q%40mail.gmail.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
On Saturday, April 9, 2022 at 11:39:25 AM UTC-7 markus...@gmail.com wrote:

> Yeah thats how i do it just with a custom Henry but mine doesnt get
> displayed. I guess this only works for Standard items like the one in your
> example.
>
> Thanks for the example
>
> Cheers
>
> Markus
>

So I think you just have a typo, s/enable/enabled.

cloud = enable*d*

[image: Screen Shot 2022-04-09 at 12.01.40.jpg]

--
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/05e1f998-579b-4a25-8852-922e03d0bf4an%40googlegroups.com.
Re: Re: Custom Main Menu item and inherited conf [ In reply to ]
Yeah it seems the typo was the Problem changed enable to enabled.

Cheers

Markus

RjOllos <rjollos@gmail.com> schrieb am Sa., 9. Apr. 2022, 21:02:

>
>
> On Saturday, April 9, 2022 at 11:39:25 AM UTC-7 markus...@gmail.com wrote:
>
>> Yeah thats how i do it just with a custom Henry but mine doesnt get
>> displayed. I guess this only works for Standard items like the one in your
>> example.
>>
>> Thanks for the example
>>
>> Cheers
>>
>> Markus
>>
>
> So I think you just have a typo, s/enable/enabled.
>
> cloud = enable*d*
>
> [image: Screen Shot 2022-04-09 at 12.01.40.jpg]
>
> --
> 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/05e1f998-579b-4a25-8852-922e03d0bf4an%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/05e1f998-579b-4a25-8852-922e03d0bf4an%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
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/CAJ4osOkr37qL_b_QmpGxwx%3DfBW37FOLAqcyyxv_c4P7ZgjAPgA%40mail.gmail.com.