[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EP-tech] Problem template on views
CAUTION: This e-mail originated outside the University of Southampton.
Hi David
Once again thank you for your quick advice. For my new template on divisions config it was enough to reload the service after editing views.pl. ? Anyway ? I did the generate_views and in the end it works #-)
Still got problems with the hideup Option (?Don't show the "up one level" link in the list page.?) inside the menue section, but I?ll fix it?
Kind regards
Jens
--
Jens Witzel
Zentrale Informatik
Universit?t Z?rich
Stampfenbachstrasse 73
CH-8006 Z?rich
mail: jens.witzel at uzh.ch<mailto:jens.witzel at uzh.ch>
phone: +41 44 63 56777
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.zi.uzh.ch%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0a8f14b9539842dd55ce08daf23a94cc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088631303188750%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000%7C%7C%7C&sdata=XQXTBMg69hNzoUs1itmAA7QIoKrz5BOxIgvD%2B3mmf%2FQ%3D&reserved=0
Von: David R Newman <drn at ecs.soton.ac.uk>
Gesendet: Montag, 9. Januar 2023 10:55
An: eprints-tech at ecs.soton.ac.uk; Jens Witzel <jens.witzel at uzh.ch>
Betreff: Re: [EP-tech] Problem template on views
Hi Jens,
I have just tried to recreate this on my test EPrints repository (running 3.4.4). I was able to successfully create a type browse view to use a template and then revert back to the default template. However, just changing the configuration and reloading the web server is insufficient, I also had to run generate_views to regenerate this view. (I think "epadmin refresh_views ARCHIVE_ID" would have done a similar job). However, I note two errors I encountered copying the exact configuration you used for the type browse view you provided:
1. The 'name' field does not exist for an eprint data object in my repository. I therefore substituted this for creators_name and I was able to generate the menu page for this browse view.
2. When it came to running generate_views to update the template used, this produced the following error message:
"Can only perform process_distinctby on multiple fields with the same field type"
I therefore removed the field "title" as it and "creators_name" are not the same type. As I don't know what type the "name" field in your configuration is, I don't know if you will have a similar issue.
My advice would be to regenerate the view from the command line:
EPRINTS_PATH/bin/generate_views ARCHIVE_ID --view type
And see if you get any error messages. If not, you should see the type browse view updated to use the new template. If you do see an error, hopefully you should be able to make the appropriate changes to your browse view configuration to fix this. Then you can try running generate_views again.
Regards
David Newman
On 09/01/2023 8:29 am, Jens Witzel via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Hi list
Does anyone have experience with assigning templates to views? Please have a look at the following example views.pl. I am trying to set templates and it works for direct views like id=divisions, but not for id=type:
$c->{browse_views} = [
{
id => "divisions",
allow_null => 1,
menus => [
{ fields => [ "divisions" ] },
],
order => "-name/title",
citation => "screen",
variations => [
"type",
],
template => 'views',
},
{ id=>"type",
menus=>[
{
fields=>[ "type" ],
hideempty=>1,
},
{
fields=>[ "name", "title" ],
hideempty=>1,
mode => "sections",
open_first_section => 1,
group_range_function => "EPrints::Update::Views::cluster_ranges_30",
grouping_function => "EPrints::Update::Views::group_by_a_to_z",
new_column_at => [ 0 ],
},
],
template => 'views',
},
];
Thx
Jens
--
Jens Witzel
Zentrale Informatik
Universit?t Z?rich
Stampfenbachstrasse 73
CH-8006 Z?rich
mail: jens.witzel at uzh.ch<mailto:jens.witzel at uzh.ch>
phone: +41 44 63 56777
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.zi.uzh.ch%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0a8f14b9539842dd55ce08daf23a94cc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088631303188750%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000%7C%7C%7C&sdata=XQXTBMg69hNzoUs1itmAA7QIoKrz5BOxIgvD%2B3mmf%2FQ%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.zi.uzh.ch%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0a8f14b9539842dd55ce08daf23a94cc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088631303188750%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000%7C%7C%7C&sdata=XQXTBMg69hNzoUs1itmAA7QIoKrz5BOxIgvD%2B3mmf%2FQ%3D&reserved=0>
*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0a8f14b9539842dd55ce08daf23a94cc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088631303188750%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000%7C%7C%7C&sdata=vk12EgxjWqtkMY7W2REECYDo0byySWnivm5kkQkSrhQ%3D&reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0a8f14b9539842dd55ce08daf23a94cc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088631303188750%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000%7C%7C%7C&sdata=wW4lWLqVUOWEdstxpEmSGyMeyQvbTtqrQ5Dc9GP08X4%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20230109/e6cec3d7/attachment-0001.html