2

I hope this isn't a dup, I can't seem to find it if it is. I have an inline VF page in a standard account detail page. A button in my VF page does a pagereference redirect to another (managed) VF page. I have to specify "_top" as my target in my form tag to get to the parent container, but the second VF page shows without the header and sidebar, because I'm calling it with a URL directly.

Are there any parameters that I could add to my URL to make the second page open WITH sidebar and headers as if I were calling the second page from a standard SFDC page?

Thanks in advance.

1
  • I think you'll just have to move the markup into a component and then create two separate pages, one with header, one without.
    – Adrian Larson
    Feb 8, 2016 at 20:13

1 Answer 1

2

Maybe you could use an iframe?

Create a new VF page that doesn't hide header and sidebar and host your second page within an iframe

<apex:page >
  <apex:iframe src="URL_TO_YOUR_PAGE"/>
</apex:page>

I think that this solution should cover most use cases as with little additional effort you could make this page accept some custom parameters from a link calling it, and then just pass those parameters to your src url inside iframe if needed.

1
  • Creative solution @smukov! I'm going to see if there are any other suggestions that may not require an additional page, but this can certainly be a viable option. I'll mark as answer if I go this route. Thanks.
    – Adam H.
    Feb 8, 2016 at 21:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .