Jump to content

Using $page->render() with urlSegments - Is it possible?


Recommended Posts

Posted

I have a page which that gets arguments from urlSegments:  mysite.com/thepage/param1/param2/param3/

I need to use $render_results = $thepage->render() in a different template...  but what I really want is something like: 

$render_results = render(/thepage/param1/param2/param3)

 

Posted

Welcome to the PW forums @Tenzing ?

You can achieve this by setting the URL segments you want to $input before you render the page. E.g.

$input->urlSegment1 = 'foo';
$input->urlSegment2 = 'bar';
echo $thepage->render();

 

  • Like 2
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...