Difference between pages "Talk:Batch close" and "Get path"
(Difference between pages)
Jump to navigation
Jump to search
imported>StDoodle m |
imported>Bale (r8628) |
||
Line 1: | Line 1: | ||
− | + | {{ | |
− | + | #vardefine:name|get_path}}{{ | |
− | + | #vardefine:return_type|string}}{{ | |
− | |||
− | |||
− | + | FunctionPage| | |
− | + | name={{#var:name}}| | |
+ | |||
+ | function1={{Function| | ||
+ | name={{#var:name}}| | ||
+ | aggregate={{#var:aggregate}}| | ||
+ | return_type=string| | ||
+ | return_also={{#var:return_also}}| | ||
+ | }}| | ||
+ | |||
+ | function_description=When called by a [[Relay Override Scripting|relay override script]], this returns the page name of the URL that was submitted in the relay browser. This does not include any variables which might follow a question mark in the URL.| | ||
+ | code1={{CodeSample| | ||
+ | title=Code Sample| | ||
+ | description=Print path information about how the current override was called.| | ||
+ | code=<syntaxhighlight> | ||
+ | print( "This script was called by the URL: " + get_path_full() ); | ||
+ | if( get_path_variables() != "" ) { | ||
+ | print( "Which is composed of the page name: " + get_path() ); | ||
+ | print( "followed by a question mark and the variables: "+ get_path_variables() ); | ||
+ | } | ||
+ | </syntaxhighlight>}}| | ||
+ | |||
+ | see_also={{SeeAlso|form_fields|get_path_full|get_path_variables}}| | ||
+ | special=When this function is called by any script that is not a relay override, it returns an empty string| | ||
+ | }} | ||
+ | |||
+ | [[Category:Relay Browser Functions]] |
Revision as of 06:27, 26 November 2014
Function Syntax
string get_path()
When called by a relay override script, this returns the page name of the URL that was submitted in the relay browser. This does not include any variables which might follow a question mark in the URL.
Code Sample
Print path information about how the current override was called.
print( "This script was called by the URL: " + get_path_full() );
if( get_path_variables() != "" ) {
print( "Which is composed of the page name: " + get_path() );
print( "followed by a question mark and the variables: "+ get_path_variables() );
}
See Also
Special
When this function is called by any script that is not a relay override, it returns an empty string