Very useful Rene!

Thanks :) And Richard do please add Th_Store("parameters", g.zExtra) :)

On 18 January 2011 13:14, Rene <[email protected]> wrote:

>  On Tue, 18 Jan 2011 09:25:09 +0000, David Bovill wrote:
> > Thanks for the comments Rene...
> >
> > On 17 January 2011 23:50, Rene  wrote:
> >
> >>  You can link to the source code file. But the source code file
> >> cannot
> >>  link to the documentation.
> >
> > It could do with a minor tweak to the template for the file info page
> > :) It's a basic UX feature - you go from docs to source code but
> > can't
> > get back :(
> >
> >>  All the templates fossil is using are under Admin (header,
> > footer,
> >>  [skins, css]) and you can change them as much as you want.
> >
> > I've been trying these, and they are great. I'm not sure I can use
> > them to create conditional links from the file section to the
> > documentation section - it may be possible using TH1 / and / or some
> > Javascript.
> >
> > I've read the TH1 pdf, and it covers the basic language well. I'm
> > wandering what access we have to Fossil variables - page title,
> > section type etc that may be available to use in the language?
> >
> > Can anyone help with posting a TH1 snippet that would detect if a
> > user was in a particular section - say the file-info page?
> >
>  It is important to understand that
>     th1 is server-side processing
>     javascript is client-side processing e.g. Your browser
>
>  I checked and in style.c these are axported to TH 1:
>   /* Generate the header up through the main menu */
>   Th_Store("project_name", db_get("project-name","Unnamed Fossil
>  Project"));
>   Th_Store("title", zTitle);
>   Th_Store("baseurl", g.zBaseURL);
>   Th_Store("home", g.zTop);
>   Th_Store("index_page", db_get("index-page","/home"));
>   Th_Store("current_page", g.zPath);
>   Th_Store("manifest_version", MANIFEST_VERSION);
>   Th_Store("manifest_date", MANIFEST_DATE);
>   Th_Store("compiler_name", COMPILER_NAME);
>   if( g.zLogin ){
>     Th_Store("login", g.zLogin);
>   }
>
>  you can check if $current_page == finfo. But you miss the arguments to
>  finfo.
>
>
>
>  in g(lobal) are these 3 defined
>   char *zPath;            /* Name of webpage being served */
>   char *zExtra;           /* Extra path information past the webpage
>  name */
>   char *zBaseURL;         /* Full text of the URL being served */
>
>  zExtra (I assume) contains the name=arg. But it isn't made available in
>  th1. So you cannot
>  generate a link to the documentation.
>
>  Bummer. You could ask if richard want to add something like:
>   Th_Store("parameters", g.zExtra);
>
>
> --
>  Rene
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to