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

[EP-tech] change the homepage title



Hi Yuri,

Good to hear you have got this sorted.? I have quickly whipped together 
some documentation for this new functionality in EPrints 3.4.3 onwards, 
otherwise I am sure I would forget again:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FUsing_Page_ID_in_Templates&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0ecb7bd5575d4f07dbc008da5e711549%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637926137019777554%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=q7VqhFmqMESegqdaBhPqSpz8R4wr9aFZyFFVidUtkbA%3D&reserved=0

This may be useful to other EPrints repository managers already on 3.4.

Regards

David Newman

On 05/07/2022 10:11 am, Yuri via Eprints-tech wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
>
> It worked like a charm (3.3 with frontpage template)! Thanks!
>
> It is documented here: 
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FAPI%3Aperl_lib%2FEPrints%2FApache%2FTemplate.pm&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0ecb7bd5575d4f07dbc008da5e711549%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637926137019777554%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ySrUezf%2B76UDeEy8enbM1EMpHS17Ux7ukmSCHc3%2FvRM%3D&reserved=0
>
>
> Il 05/07/22 10:49, David R Newman via Eprints-tech ha scritto:
>>
>> Hi Yuri,
>>
>> For EPrints 3.4.3 I implemented a solution that may address your 
>> question:
>>
>> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fissues%2F111&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0ecb7bd5575d4f07dbc008da5e711549%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637926137019777554%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=e2Flxh88ZmWYNJ0gTegl3E7Egdk6re0QxDCOWEydtOc%3D&reserved=0
>>
>> This can be implemented by adding converting a simple <body>tag in 
>> your template to something like:
>>
>> <body id="page_{pin:page_id}">
>>
>> This can then be used in CSS by starting the entry with:
>>
>> #page_
>>
>> An example might be that you want to change the summary box on 
>> abstract pages only:
>>
>> #page_static_abstract .ep_summary_box
>>
>> Or you may want to change the report title heading on the IRStats2 
>> report pages:
>>
>> #page_IRStats2_Report .report_title
>>
>> I had been meaning to document this properly on the wiki but had not 
>> got round to it.? As I did it sometime before the release of 3.4.3, I 
>> did not want to document it for people to then find they could to use 
>> it until 3.4.3 was out.? Then when 3.4.3 was released, I forgot about 
>> writing the documentation.
>>
>> I guess this functionality could be used to solve your problem in the 
>> following way.? As the homepage has no path using the markup for the 
>> <body>tag I described above would use:
>>
>> #page_static
>>
>> So say you wanted the hide the main heading on the homepage you could 
>> add the following to the CSS:
>>
>> #page_static h1#page-title {
>> ??? display: none;
>> }
>>
>> If you are not currently using 3.4.3, it is not straightforward to 
>> backport this code for earlier versions of EPrints, especially 
>> pre-3.4.? You could always just create a separate template for your 
>> homepage.? This is quite common across EPrints repositories.? This 
>> would allow you to have complete control over your <title>and 
>> <h1>tags, as any changes would only affect your homepage.? To make 
>> the static page for your homepage use this alternative template, you 
>> just need to add it to the XML markup for the static page.? Lets say 
>> the template is called frontpage.xml you would add (somewhere before 
>> the xpage:bodytag):
>>
>> <xpage:template>frontpage</xpage:template>
>>
>> Obviously, having a separate template for your homepage will add to 
>> your workload if/when you choose to rebrand your repository.
>>
>> Regards
>>
>> David Newman
>>
>> On 05/07/2022 8:32 am, Yuri via Eprints-tech wrote:
>>> *CAUTION:* This e-mail originated outside the University of 
>>> Southampton.
>>>
>>> Hi!
>>>
>>> ?I would like to display any title in the eprints homepage (xpage) 
>>> but still have a page title (<title> tag). Is this possible? Also a 
>>> css solution is ok. Could be the h1 title in the page be marked by a 
>>> class (for example the filename of the xpage)?
>>>
>>>
>>> *** 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=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0ecb7bd5575d4f07dbc008da5e711549%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637926137019777554%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=upZvOahTEgx9X4otcweJbeguMQis3BSyTRkj7QpmUz4%3D&amp;reserved=0
>>> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0ecb7bd5575d4f07dbc008da5e711549%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637926137019777554%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=7XEIxJFzkVZVZE5oacVxMEr3HciPSEX710iOkizLNLg%3D&amp;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&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0ecb7bd5575d4f07dbc008da5e711549%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637926137019777554%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=upZvOahTEgx9X4otcweJbeguMQis3BSyTRkj7QpmUz4%3D&amp;reserved=0
>> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0ecb7bd5575d4f07dbc008da5e711549%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637926137019777554%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=7XEIxJFzkVZVZE5oacVxMEr3HciPSEX710iOkizLNLg%3D&amp;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&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0ecb7bd5575d4f07dbc008da5e711549%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637926137019777554%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=upZvOahTEgx9X4otcweJbeguMQis3BSyTRkj7QpmUz4%3D&amp;reserved=0
> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C0ecb7bd5575d4f07dbc008da5e711549%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637926137019777554%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=7XEIxJFzkVZVZE5oacVxMEr3HciPSEX710iOkizLNLg%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20220705/8aac2540/attachment-0001.html