Problem when creating pages

  • I have a problem when creating pages. The website is located in a folder named'v4' and the Perch files are in a folder named 'hekla'. Now, when I create a page in the Perch backoffice it is created at the root of the website, i.e. not in the'v4' folder where the other Perch pages are located. I can move the page to the'/v4' folder from Perch's back office by editing the'Location' tab but I have another problem. In the created page the following code is placed: <?php include(str_replace('/', DIRECTORY_SEPARATOR,' v4/hekla/templates/pages/default.php'); ?> and it does not work.

    I have to manually replace the path'v4/hekla/templates/pages/default.php' by 'hekla/templates/pages/default.php' for the page to finally work.

    Questions:

    1. how to create the page directly in the'/v4' folder?

    2. How to indicate the correct path to 'hekla/templates/pages/default.php' in the created page?

    Thank you in advance for your answers.

  • drewm

    Approved the thread.
  • Yes I prefer to stay in the root of the web project but it is a request from the customer.


    I tried to configure the Path Configuration but without success. Pages are always created at the root of the site. And when I move them the path to the master template is modified.


    I fixed the problem by modifying two classes of the Perch Core system. I know it's not ideal, but it's the only solution I've found so far.


    If someone has a cleaner solution, I'm in! ;)

  • Yes I prefer to stay in the root of the web project but it is a request from the customer.


    I would suggest you do not let non-technical people make technical decisions :S


    I fixed the problem by modifying two classes of the Perch Core system


    You lose first-party support this way! Plus future updates may break the site.