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

[EP-tech] change the homepage title

Hi Yuri,

For EPrints 3.4.3 I implemented a solution that may address your question:


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:


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:


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):


Obviously, having a separate template for your homepage will add to your 
workload if/when you choose to rebrand your repository.


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%7C1ef1b254c8294ced600908da5e6335dc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637926077464471518%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=Zl9uZv1yPptUjjkC%2BjuZ4J4gTwogPOxaGWYq8EvkNVg%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%7C1ef1b254c8294ced600908da5e6335dc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637926077464471518%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=hXHlycFEMGRxwcjcWJT4H2AmQLOsrE%2FPXnR%2BllBmISc%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20220705/8ef4e2d2/attachment.html