Jump to content

Thomas K

Members
  • Posts

    4
  • Joined

  • Last visited

Thomas K's Achievements

Newbie

Newbie (2/6)

0

Reputation

  1. Perfect. Did not know I could do it that way. I only looked in the config file...thx a lot Harmster
  2. 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?
  3. It works! Thx a lot Pete. It's my first project with PW, so I did not know the $page->render() function...so simple PS. Sorry for the confusion with echo $header_page->url; I was just trying to show that I had access to the pw api from the other script.
  4. Does anyone know if there's a trick to include a PW header & footer into another PHP script? I would like to have the same header and footer on an old ordering system as I have on the main website programmed in PW. I've tried to make a header page, that simply shows the header of the website, but I cannot include('path/to/headerpage') in my other PHP script?? This works: // Include ProcessWire require("../index.php"); // Get header $header_page = wire()->pages->get("/external_head/"); echo $header_page->url; This does not work for me: // Include ProcessWire require("../index.php"); // Get header $header_page = wire()->pages->get("/external_head/"); include($header_page->url);
×
×
  • Create New...