$CurrentPage

A global merge field type to use when referencing the current Visualforce page or page request.

Usage

Use this global variable in a Visualforce page to reference the current page name ($CurrentPage.Name) or the URL of the current page ($CurrentPage.URL). Use $CurrentPage.parameters.parameterName to reference page-request parameters and values, where parameterName is the request parameter being referenced. parameterName isn't case-sensitive.

Example

<apex:page standardController="Account">
    <apex:pageBlock title="Hello {!$User.FirstName}!">
        You belong to the {!account.name} account.<br/>
        You're also a nice person.
    </apex:pageBlock>
    <apex:detail subject="{!account}" relatedList="false"/>
    <apex:relatedList list="OpenActivities" 
        subject="{!$CurrentPage.parameters.relatedId}"/> 
</apex:page>