Hi Ferran,

Ferran Jorba wrote:
Aha!  I wasn't using the names ending in «brief» and «detailed».

Just a quick comment: no need to use the "_detailed" or "_brief"
suffixes. The important is that from the output format HD you refer to
the exact name of the detailed format template you have created (ditto
for the HB). Ex:

$ less /opt/cds-invenio/etc/bibformat/output_formats/HB.bfo
tag 980__a:
MYCOLLECTION1 --- my_custom_brief_template_for_coll1.bft
MYCOLLECTION2 --- my_custom_brief_template_for_coll2.bft
default: Default_HTML_brief.bft

$ less /opt/cds-invenio/etc/bibformat/output_formats/HD.bfo
tag 980__a:
MYCOLLECTION1 --- my_custom_detailed_template_for_coll1.bft
MYCOLLECTION2 --- my_custom_detailed_template_for_coll2.bft
MYCOLLECTION3 --- my_custom_detailed_template_for_coll3.bft
default: Default_HTML_detailed.bft

In this example, a record with tag 980__a==MYCOLLECTION2 would be
formatted using template "my_custom_brief_template_for_coll2.bft"
in the search results list, and
"my_custom_detailed_template_for_coll2.bft" when displaying the
/record/xxx detailed page.
A record with 980__a==MYCOLLECTION3 would be formatted using template
"Default_HTML_brief.bft" in the search results list, and
"my_custom_detailed_template_for_coll3.bft" when displaying the
/record/xxx detailed page.

Don't forget that my_custom_brief_template_for_coll2.bft (and all other
templates) should be moved to
/opt/cds-invenio/etc/bibformat/format_templates/ , and must be readable
by your apache user:
$ ls -l /opt/cds-invenio/etc/bibformat/format_templates/my_custom_brief_template_for_coll2.bft
-r-r--r-- 1 apache apache  [...]

With this setup, you should be able to see the the list of available
templates when editing the HD or HB output formats from the web
interface (well, note that the output format files must be writable by
Apache if you want to modify them from the web interface)

Best regards
--
Jerome Caffaro ** CERN Document Server ** <http://cds.cern.ch/>

Reply via email to