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

[EP-tech] How to find out, which ist the current URL of a page?



What kind of page, and what?s your use-case?

                Item page: it?s possible to call the url function of an object
                Browse view page: Should be possible, but might require some fancy footwork
                Static page: Not sure, but I don?t think I?ve ever seen a way to do it
                Screen plugin: there?s a redirect_to_me_url function


[cid:image001.png at 01D1DD11.292FDC40]<http://www.jisc.ac.uk/>

Adam Field
SHERPA services analyst developer



From: <eprints-tech-bounces at ecs.soton.ac.uk> on behalf of "jens.vieler at id.uzh.ch" <jens.vieler at id.uzh.ch>
Reply-To: "eprints-tech at ecs.soton.ac.uk" <eprints-tech at ecs.soton.ac.uk>
Date: Wednesday, 13 July 2016 11:58
To: "eprints-tech at ecs.soton.ac.uk" <eprints-tech at ecs.soton.ac.uk>
Subject: [EP-tech] How to find out, which ist the current URL of a page?


Again,

how to find out, which ist the current URL of a page?

We found out, that perl_lib/EPrints/Script.pm supports current_user and current_lang, but why there is no current_url?

Line 86:
$state->{current_user} = $state->{session}->current_user;
$state->{current_lang} = [$state->{session}->get_langid, "STRING" ];
$state->{current_url} = [$state->{session}->current_url, "STRING" ];

Works fine within a templates <epc...>-statement!

Are there alternatives?
Cheers
 Jens

--
Jens Vieler
Informatikdienste
Universit?t Z?rich
Stampfenbachstrasse 73
CH-8006 Z?rich

mail:  jens.vieler at id.uzh.ch
phone: +41 44 63 56777
http://www.id.uzh.ch

[nactive hide details for jens.vieler---12.07.2016 15:49:26---Dear List, i]jens.vieler---12.07.2016 15:49:26---Dear List, i want to show (or not) content, ruled by a template, depending on the

Von: jens.vieler at id.uzh.ch
An: (eprints-tech at ecs.soton.ac.uk) <eprints-tech at ecs.soton.ac.uk>
Datum: 12.07.2016 15:49
Betreff: [EP-tech] Template action depending on a documents URL
Gesendet von: eprints-tech-bounces at ecs.soton.ac.uk

________________________________



Dear List,

i want to show (or not) content, ruled by a template, depending on the documents URL. Specific problem: the default template is serving a search
input field, which doesn't make sense for the search itself. So i want to exclude this form if i am already inside simple od advanced search.

Does anybody could give me a 3-line code example of howto deal with <epc:if...> in context with the url of a document?

Best regards
Jens

--
Jens Vieler
Informatikdienste
Universit?t Z?rich
Stampfenbachstrasse 73
CH-8006 Z?rich

mail:  jens.vieler at id.uzh.ch
phone: +41 44 63 56777
http://www.id.uzh.ch<http://www.id.uzh.ch/>*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/

Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc?s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.

Jisc Services Limited is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under company number 2881024, VAT number GB 197 0632 86. The registered office is: One Castle Park, Tower Hill, Bristol BS2 0JA. T 0203 697 5800.  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20160713/514caddf/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1264 bytes
Desc: image001.png
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20160713/514caddf/attachment-0001.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 106 bytes
Desc: image002.gif
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20160713/514caddf/attachment-0001.gif