[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EP-tech] Different templates or depending on URI
Hi all,
In response to John's comment/question:
"This is possible in v3.3.16 (and probably earlier 3.3 versions. Not
sure about 3.4):
$c->{user_area_template} = 'user';"
On EPrints 3.4.x, if you want a different page template for the back-end
admin pages compared to the front-end public pages, then you should
create a template called *default_internal.xml* in the same directory as
the default.xml template, (typically
EPRINTS_PATH/archives/ARCHIVE_ID/cfg/lang/en/templates/).? EPrints 3.4
has packages default_internal.xml in both lib/templates/ and
flavours/pub_lib/lang/en/templates/. Typically most people start by
copying their current archive's default.xml to default_internal.xml in
the same directory and then make the various modification they need.?
However, you could create the default_internal.xml template from
scratch, if you want something that looks completely different.? I can
see that user_area_template is still referenced in /cgi/users/home and
/cgi/respond_to_doc_request and this will supersede the
default_internal.xml template if $c->{user_area_template} is defined.
From 3.4.3 onwards using page IDs in templates has been possible [1].?
This allows you to write some bespoke CSS and only apply it to a
particular type of page (e.g. abstract pages, browse view pages) or
specific static pages (e.g. contact or policies page) It also generates
page IDs for dynamic and back-end pages (e.g. searches, phrase editor,
edit subjects, review buffer, etc.) based on their screen plug-in name.?
So the page ID for the "Send Test Email" page would be *Admin_TestEmail*
whereas the ID for an abstract page would be either *static_abstract* or
*static_id_eprint_abstract* if your have long URLs enabled (e.g.
abstract pages are on URLs like https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fexample.eprints.org%2Fid%2Feprint%2F77%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C3ea9f449eb1e4fecaf7c08daf7e28204%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638094849451432536%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2FRAIaWM5Mihmu1XD6kol%2BWJImlzncbTNpnLpIDADjS0%3D&reserved=0).
Regards
David Newman
[1] 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%7C3ea9f449eb1e4fecaf7c08daf7e28204%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638094849451432536%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Edmh%2F2I2t%2BdsYH7xQABT3WW6JlVtaGGj45QM9VuqDpk%3D&reserved=0
On 16/01/2023 15:50, Jens Witzel via Eprints-tech wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
>
> ? i love your answer John ? it works! ?
>
> Cheers from Switzerland
> 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%7C3ea9f449eb1e4fecaf7c08daf7e28204%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638094849451432536%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RN3ie0NQj6CbAvVyqtfpsQme27lsAV53MqS%2BTw5ays8%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%7C3ea9f449eb1e4fecaf7c08daf7e28204%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638094849451432536%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RN3ie0NQj6CbAvVyqtfpsQme27lsAV53MqS%2BTw5ays8%3D&reserved=0>
>
> *Von:*John Salter <J.Salter at leeds.ac.uk>
> *Gesendet:* Montag, 16. Januar 2023 16:39
> *An:* eprints-tech at ecs.soton.ac.uk; Jens Witzel <jens.witzel at uzh.ch>
> *Betreff:* RE: Different templates or depending on URI
>
> This is possible in v3.3.16 (and probably earlier 3.3 versions. Not
> sure about 3.4):
> $c->{user_area_template} = 'user';
>
> This will use a template file 'user.xml'.
>
> Cheers,
>
> John
>
> *From:*eprints-tech-bounces at ecs.soton.ac.uk
> [mailto:eprints-tech-bounces at ecs.soton.ac.uk
> <mailto:eprints-tech-bounces at ecs.soton.ac.uk>] *On Behalf Of *Jens
> Witzel via Eprints-tech
> *Sent:* 16 January 2023 15:30
> *To:* eprints-tech at ecs.soton.ac.uk
> *Subject:* [EP-tech] Different templates or depending on URI
>
> *CAUTION:*This e-mail originated outside the University of Southampton.
>
> Another question: is there a ?<epc:if expr?>? way inside a template or
> a config in general, to let front and backend have different looks or
> let there be different templates? E.g. depending on ?/cgi/users? as
> URI? Otherwise I?ll have to use dynamic_template.pl
>
> Any hint is welcome
> 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%7C3ea9f449eb1e4fecaf7c08daf7e28204%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638094849451432536%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RN3ie0NQj6CbAvVyqtfpsQme27lsAV53MqS%2BTw5ays8%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%7C3ea9f449eb1e4fecaf7c08daf7e28204%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638094849451432536%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RN3ie0NQj6CbAvVyqtfpsQme27lsAV53MqS%2BTw5ays8%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%7C3ea9f449eb1e4fecaf7c08daf7e28204%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638094849451432536%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ysD87zJewtR1zBx%2Bjj4INVpbUm0UpMql6C1201gCDSk%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%7C3ea9f449eb1e4fecaf7c08daf7e28204%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638094849451432536%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xzO48qnfxmsV16dBgYorRufXEdva21wc7dL7evCXXJo%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20230116/e2c1c637/attachment-0001.html