Re: [viewvc-users] Looking for a template variable

"C. Michael Pilato" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Organization CollabNet, Inc.
Message-ID <[email protected]>
John Beranek wrote:
> Thanks, your verbatim patch didn't work, but the following did:
> 
>     'request_uri' : request.get_url(),

Oh, okay.  Cool.

> On a similar topic, how easy would it be to add a variable to the
> configuration and then pass that as a template variable. I ask because
> using ViewVC on a master site and other mirror sites requires different
> page elements. I'd like to be able to use the same code/templates
> everywhere, but have conditional bits of the templates that show
> different things on different sites.

DISCLAIMER:
I'm not really in a position to verify this right now, so it could be bogus.

The templates are given access to the configuration via the [cfg] directive.
 So perhaps you can create new configuration items in viewvc.conf under,
say, the [general] section:

   [general]
   my_variable = foo

And then in the templates, reference [cfg.general.my_variable]

-- 
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2464948

To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkuraX4ACgkQokEGqRcG/W60FQCfYu6IzgjmclIqGx6cR7W/4UL0
iOYAn1CDGzO2Z22tu2fGqyOFHkRPVTsf
=Gp1X
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.