+ Start a Discussion
sf.ax1637sf.ax1637 

Get the name of the page that contains a ViusalForce page

We have a VisualForce page that needs to change it's appearance based on which parent page contains our page.

 

For example, we have a list of 10 phrases.  4 of them should appear on the Account page, 9 should appear on the Contact page, etc...

 

What we'd like to do is to have a filter string configured for each phrase, then compare the filter string against the name of the current page to determine which ones to display.

 

As near as I can tell, $CurrentPage returns the VisualForce page (not the page that contains the VisualForce view), so that doesn't seem like what we want.  Also, I imagine that this sort of filtering is best done in a controller, so we need to somehow get the current containing page name from the controller.

 

Any ideas?

cwall_sfdccwall_sfdc

Not sure I get what you're wanting to do, but could you use {!$CurrentPage.name} and apex:param as a child of apex:include to pass page name as a query param to the include page's controller?