Thomas K Posted November 22, 2013 Share Posted November 22, 2013 Hi, When I include ProcessWire from another PHP script like this: // Include ProcessWire require("../../pw/index.php"); // Get header $header_page = wire()->pages->get("/external_head/"); echo $header_page->render(); Then all the generated urls from PW like: echo $pages->get("/en/restaurants")->url; are relative to the other PHP script and not relative to the original PW path. I want them to be relative to the PW path, is that possible? Link to comment Share on other sites More sharing options...
Harmster Posted November 22, 2013 Share Posted November 22, 2013 Edit: I was toofast, try to use the $config->url or $config->path properties. (Check cheatsheet.processwire.com for more details. ) 1 Link to comment Share on other sites More sharing options...
Thomas K Posted November 25, 2013 Author Share Posted November 25, 2013 Perfect. Did not know I could do it that way. I only looked in the config file...thx a lot Harmster Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now