Hi Victor,

In data mercoledì 14 aprile 2010 15:52:34, Victor Engmark ha scritto:
> Hi all,
> 
> To be able to use autosuggest JavaScript in the tagging interface,
> I'll need to include some files in the page header. I had a look at
> the results of
> find ~/src/cds-invenio/ -regex ".*_\(webinterface\|templates\).py"
> -exec grep -l "\.js" {} \;
> , and it looks like the options are
> * include in the page body
> * send to the page function in the metaheaderadd parameter
> 
> Since the JS should only be included when the user is logged in, and
> since page() only seems to be used for collections in
> websearch_webinterface.py, where and how would be the best way to do
> this?
> 

actually the "page" function is indirectly using the same template used by the 
"pageheaderonly" function, which is the other function that is used to 
generate an Invenio page.

Both have the "metaheaderadd" parameter, so I would suggest you to pass the 
javacript into the such parameter during the call to "pageheaderonly".

Cheers,
        Sam

-- 
Samuele Kaplun ** CERN Document Server ** <http://cds.cern.ch/>

Reply via email to