On Wed, Apr 14, 2010 at 4:04 PM, Samuele Kaplun <[email protected]> wrote:
> 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".

Do you know where pageheaderonly() or page() is called for the content
produced by WebInterfaceRecordPages? I can't find that anywhere
relevant in the websearch module. I can't call it in my code, because
it's run somewhere in the middle of creating the page.

-- 
Victor Engmark

Reply via email to