[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Browse View



Hi Sonu,

In response to your questions:

1. I am 100% not sure what you mean by question 1.? I think what you are 
asking is if you have multiple fields that have the same sort of data 
how can they be incorporated into the same view.? An example of this is 
creators and editors name.? This can be done with the following under menus:

 ?fields => [ "creators_name", "editors_name" ],

If you add an additional block to menus then that will be a subdivision 
to previous block as demonstrated in the config you pasted for the type 
view below.? You get pages for types and subpages for year.

If you have fields that do not have the same type of data, then this may 
not work or you will get a very odd looking view.

2. I don't think anyone has every asked to split by month but without 
caring about the year as well.? I am not sure but the following may 
work, as date_month is stored as its own sub-field:

 ? ? ? ? variations => [
 ? ? ? ? ? ? ? ? ? ? ? ? ? ?"date_month",
 ??? ??? ];

3. If you have a view for divisions you cannot get it to specifically 
display differently for one division over another. If one division has a 
lot more items than another then various settings for the view can be 
used to limit how many items appear on a page.? Say you use creator's 
name; for a large division using creator's name as a subdivision might 
lead to individual sub-pages for each starting letter for a creator's 
name, whereas a small division may only have 2-3 pages with a wide 
spectrum of starting letters on each page, as overall they have less 
items to display.

4. I think the best solution to your problem in 3 is like you question 
for 4 and to have a specific view for this presumably large division and 
then you can configure this how you like and different from other 
divisions.? To do this you need to add a filter (after variations) for 
divisions like:

filters => [
 ??????????????????????? { meta_fields => [ "divisions" ], value => 
"DIVISION_ID", describe => 0 }
 ??????????????? ],

Note that the value is the division ID not the label so it won't be 
"Department of Mass Communication" but probably some shortened value 
used as its ID under the subject tree (e.g. dept_mass_comm).

Does anyone else have any idea for these questions.? With views there is 
often more than one way to solve a problem and when you are aware of 
more options, you can consider which one most closely meets your 
requirements or sometimes maybe thsu even allows you to do something you 
had not thought of.

Regards

David Newman

On 12/10/2021 05:46, Sonu Yadav via Eprints-tech wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
> How to separate the month from the date for menu and grouping in 
> browse view page:
> I have Four questions/query
> 1. how to make one more field in the menus
> 2.? I have two menus, first is the type of the item then?the other is 
> the year then I want to make one more that is the month when I use 
> date;res=month in the menu it is showing month with the year but I 
> want to group by month only.
> {
> ? ? ? ? ? ? ? ? id => "type",
> ? ? ? ? ? ? ? ? menus => [
> ? ? ? ? ? ? ? ? ? ? ? ? {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? fields => [ "type" ],
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? reverse_order => 1,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? allow_null => 1,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? new_column_at => [10,10],
> ? ? ? ? ? ? ? ? ? ? ? ? },
> ? ? ? ? ? ? ? ? ? ? ? ? {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? fields => [ "date;res=year" ],
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? reverse_order => 1,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? allow_null => 1,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? new_column_at => [10,10],
> ? ? ? ? ? ? ? ? ? ? ? ? }
>
> ? ? ? ? ? ? ? ? ],
> ? ? ? ? ? ? ? ? order => "creators_name/title/editors_name",
> ? ? ? ? ? ? ? ? variations => [
> # ? ? ? ? ? ? ? ? ? ? ? ? "creators_name;first_letter",
> # ? ? ? ? ? ? ? ? ? ? ? ? "date;res=year",
> ? ? ? ? ? ? ? ? ? ? ? ? ? ?"date;res=month",
> #? ? ? ? ? ? ? ? ? ? ? ? ?"publication;first_letter",
> # ? ? ? ? ? ? ? ? ? ? ? ? "volume",
> # ? ? ? ? ? ? ? ? ? ? ? ? "number",
> ? ? ? ? ? ? ? ? ? ? ? ? ? ?"DEFAULT" ],
> ? ? ? ? },
>
> 3. Is there any way to categorize a particular division menu by year, 
> then by month? when I create the menu functionality in the views.pl 
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fviews.pl%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca0d4aed308d34d98a69508d98d560986%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696222923135999%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=sWTFpVuOyxVT6fvktdHBAgxU52i9%2BK56mC57ECDTSgI%3D&amp;reserved=0> 
> it applies to all the division categories.
> 4. Is there any way to generate the views of the particular division, 
> not the whole division like I want to create a browse view of the 
> Department of Mass Communication only.
>
> Thanks,
>
> *** 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&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca0d4aed308d34d98a69508d98d560986%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696222923135999%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Mqj0tRVvFhKviDklNzxPynLznnpd9cZ%2F0LrKj1JM6PE%3D&amp;reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca0d4aed308d34d98a69508d98d560986%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696222923135999%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=s3Z10moyrdKPIfhZG3YC6J5WlWw%2BDjclb8gjlwS%2BqeM%3D&amp;reserved=0


-- 
This email has been checked for viruses by AVG.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avg.com%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca0d4aed308d34d98a69508d98d560986%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696222923135999%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=OK%2BUOI3QIKAJsI9Gcch4e020H9Gk3sFif6kpCw%2FFJs8%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20211012/a1a99ae1/attachment-0001.html