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.
<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>