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

[EP-tech] Browse View



CAUTION: This e-mail originated outside the University of Southampton.
Can anybody help me to separate month from the date field?
Here I used the code 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%7Cae944d98b39843a9823208d98ef69e08%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637698013531768376%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=xmMlJsDdcGDOJPZ3a1UF8m9UO0QchIGikdE%2FSlzqk2c%3D&amp;reserved=0> file but Its not working...
I am sharing the
          id=>"journal_volume",
        fields=> "publication,date;res=year",
                    new_column_at => [1, 1],
                    allow_null => 0,
#                    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",
#                   group_sorting_function => "EPrints::Update::Views::default_sort",
        order=>"-date/title",
                    variations => [
                            "creators_name;cloud,jump=plain,cloudmin,no_seperator","date;month",
"DEFAULT" ],
                    filters => [
                        { meta_fields => [ "divisions" ], value => "Univ6", describe => 0 }
                       ],

},



On Wed, Oct 13, 2021 at 12:32 PM Sonu Yadav <yvsonu1987 at gmail.com<mailto:yvsonu1987 at gmail.com>> wrote:
Hi,
The following variation is not working. when I used date_month it is showing an error. when I used to date;res=month the following things is showing:-
[image.png]
variations => [
                           "date_month",
        ];


Also When I use this date_month in the menu also but it is showing an error that there is no metadata field.

On Tue, Oct 12, 2021 at 1:28 PM David R Newman <drn at ecs.soton.ac.uk<mailto:drn at ecs.soton.ac.uk>> wrote:

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%7Cae944d98b39843a9823208d98ef69e08%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637698013531768376%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=xmMlJsDdcGDOJPZ3a1UF8m9UO0QchIGikdE%2FSlzqk2c%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%7Cae944d98b39843a9823208d98ef69e08%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637698013531768376%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=VLlCBkLeilOn6RtwXjcjkDevVhDjCOzpxTwbV2Shz%2BM%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%7Cae944d98b39843a9823208d98ef69e08%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637698013531778335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=wtqsgIK%2FKcfC9SStSCZ9BUYrw47xezC4J9nj830r9VQ%3D&amp;reserved=0

[https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fipmcdn.avast.com%2Fimages%2Ficons%2Ficon-envelope-tick-green-avg-v1.png&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cae944d98b39843a9823208d98ef69e08%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637698013531778335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=LfPNFmGAwRsq7UvZJ4R9XXtMFps6U2MRwdN3M6KARtU%3D&amp;reserved=0]<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cae944d98b39843a9823208d98ef69e08%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637698013531778335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=614hzdwTEtJuO9cVRGV5g%2FWO%2BgzB8hZE0N3N5YZLugQ%3D&amp;reserved=0> Virus-free. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cae944d98b39843a9823208d98ef69e08%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637698013531778335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=l8Ysv1ZcD5lusL79XoHumqzndB4MvX%2BLry6R7wOlwVk%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cae944d98b39843a9823208d98ef69e08%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637698013531778335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=614hzdwTEtJuO9cVRGV5g%2FWO%2BgzB8hZE0N3N5YZLugQ%3D&amp;reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20211014/79b8c6d8/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 19201 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20211014/79b8c6d8/attachment-0001.png