Re: [Trac] Re: shared templates and htdocs

2019-07-05 Thread RjOllos


On Thursday, November 15, 2018 at 3:01:19 AM UTC-8, Clemens Feige wrote:
>
> RjOllos wrote on 14.11.2018 at 21:53: 
> > On Wednesday, November 7, 2018 at 2:35:10 AM UTC-8, Clemens Feige wrote: 
> >> 
> >> Hello 
> >> 
> >> I like to ask for help concerning placement of shared templates and 
> >> htdocs. How can I share one common  and one common 
> >>  file across multiple TRAC repositories? 
> >> 
> >> I have read the docu (TracIni, TracInterfaceCustomization and others) 
> >> but cannot get it working. My current workaround is to copy the 
> >>   many times into each repo. 
> >> 
> >> I am using TRAC 1.2.2 on Linux. 
> >> 
> >> This is my desired directory structure: 
> >>/data/trac/trac.global.ini 
> >>/data/trac/htdocs/style.cs 
> >>/data/trac/templates/site.html 
> >>/data/trac/plugins/ 
> >> ... then a bunch of repos: 
> >>/data/trac/repos/myrepo1/ 
> >>/data/trac/repos/myrepo2/ 
> >> 
> >> This is how I import the CSS file from the  
> >> 
> >> 
> >> This is what I put in the trac.ini of each repo: 
> >>[inherit] 
> >>file = /data/trac/trac.global.ini 
> >>plugins_dir = /data/trac/plugins 
> >>htdocs_dir = /data/trac/htdocs 
> >> 
> >> Please advice. 
> >> 
> >> Thanks 
> >> Clemens 
> >> 
> > 
> > You probably need to set [inherit] templates_dir: 
> > https://trac.edgewall.org/wiki/TracIni#inherit-templates_dir-option 
> > 
> > Do you find style.css when you navigate to?: 
> > /chrome/shared/style.css 
> > 
> > It looks like you need to substitute "shared/style.css" for 
> > "site/style.css" in your template. 
> > 
> > - Ryan 
> > 
>
> Thanks Ryan. 
>
> Your hints were very helpful and solved my issue. 
>
> I did as you said: 
> I added "[inherit] templates_dir" to the trac.ini of each repo: 
>
> [inherit] 
> file = /data/trac/trac.global.ini 
> plugins_dir = /data/trac/plugins 
> templates_dir = /data/trac/templates 
> htdocs_dir = /data/trac/htdocs 
>
> ... and in site.html changed to: 
>
>
> The CSS is now found at URL /chrome/shared/style.css 
>
> Thanks again 
> Clemens 
>

Edited page to make a section for information on Sharing Templates:
https://trac.edgewall.org/wiki/1.3/TracInterfaceCustomization?action=diff=5

- 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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/76b1309b-aa17-4f24-b429-7ae9643888db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Re: shared templates and htdocs

2018-11-15 Thread Clemens Feige

RjOllos wrote on 14.11.2018 at 21:53:

On Wednesday, November 7, 2018 at 2:35:10 AM UTC-8, Clemens Feige wrote:


Hello

I like to ask for help concerning placement of shared templates and
htdocs. How can I share one common  and one common
 file across multiple TRAC repositories?

I have read the docu (TracIni, TracInterfaceCustomization and others)
but cannot get it working. My current workaround is to copy the
  many times into each repo.

I am using TRAC 1.2.2 on Linux.

This is my desired directory structure:
   /data/trac/trac.global.ini
   /data/trac/htdocs/style.cs
   /data/trac/templates/site.html
   /data/trac/plugins/
... then a bunch of repos:
   /data/trac/repos/myrepo1/
   /data/trac/repos/myrepo2/

This is how I import the CSS file from the 
   

This is what I put in the trac.ini of each repo:
   [inherit]
   file = /data/trac/trac.global.ini
   plugins_dir = /data/trac/plugins
   htdocs_dir = /data/trac/htdocs

Please advice.

Thanks
Clemens



You probably need to set [inherit] templates_dir:
https://trac.edgewall.org/wiki/TracIni#inherit-templates_dir-option

Do you find style.css when you navigate to?:
/chrome/shared/style.css

It looks like you need to substitute "shared/style.css" for
"site/style.css" in your template.

- Ryan



Thanks Ryan.

Your hints were very helpful and solved my issue.

I did as you said:
I added "[inherit] templates_dir" to the trac.ini of each repo:

[inherit]
file = /data/trac/trac.global.ini
plugins_dir = /data/trac/plugins
templates_dir = /data/trac/templates
htdocs_dir = /data/trac/htdocs

... and in site.html changed to:
 

The CSS is now found at URL /chrome/shared/style.css

Thanks again
Clemens

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.