Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by Cesco

  1. Hi, i try to add multiple page on pagereference field via php script.

    I have a cycle with this code inside



    Page instance has services_field populated like below (it seems correct):

    [services_field] => ProcessWire\PageArray Object
                        [count] => 7
                        [items] => Array
                                [Page:0] => Array
                                        [id] => 1091
                                        [name] => dtv
                                        [parent] =>

    When save page, all information are saved but not services_field.

    How can i do ?






  2. Hi, i created a template with PageReference Field on a multilanguage site. I set possbility to create new page directly from the page template, it works. The new entry was create only in default language. After creation i set the other language by editing the entry. When i try to get field on view i don't find entry in other language:

    $services = $pages->find("template=service")

    It returns all services if i view site in default lanauge, empty if i view site in other language.

    If i create the services directly on Tree it works.

    What i can do?

    Thanks in advance.

  3. On 9/9/2021 at 10:07 AM, diogo said:

    Just want to point out that you can also do this with the new URL hooks https://processwire.com/blog/posts/pw-3.0.173/#introducing-url-path-hooks

    I can't test it now, but something like this should work (not tested!):

    $wire->addHook('/{building}', function($event) {
      $name = $event->sanitizer->pageName($event->arguments("building"));
      $building = $event->pages->findOne("parent=/buildings/, name=$name");
      if($building->viewable()) return $building;


    Interesting solutions, i try url match works but it redirect to complete path instead of return content Interesting solution. I've tried it, but instead of showing the content of the page in the url I'm at, it redirect to the full url 🤔

  4. Thanks @Jan Romero for your answer. My goal is to have the url of buildings like children of home page, so $page->url must return "shortcut" path. I think your last idea , all the build under home page and a flag to filter them on a page tab (?), is the best solution, if need i can create children and path still correct. Is there any module to make it or i must create new one? 



  5. Hi

    i need to insert many pages (over 300) to my website. This pages are buildings and i want to organize them like children inside a parent page.

        |_ building 1
        |_ building 2


    So i want that url of this pages are not "https://.... /buildings/building-1" but "https:// .... /building-1"

    I don't want to use rewrite because i think it not a good solution about SEO. Can i strip parent url before ?




  6. Hi to all,


    i try to save translation on my template from "Find file to translate". Set the string, click save, ProcessWire give me notify "1 translation changed +1" ... but after all field are blank.

    Processwire v. 3.0.120

    Any suggestion?


    Thanks in advance

  7. On 7/8/2018 at 2:46 AM, joshuag said:

    It's coming along quite nicely. I do not have a firm release/completion date yet, although working towards it as fast as possible. As soon as I can I will answer all your questions about Designme. Hopefully by the end of this week I will be able to show you guys some more features that I didn't include in the preview video. 🙂

    Really nice! Good Job

    • Like 1
  8. Hi


    I develop a website with processwire in a subdomain of the destination domain, but now i can access to admin only through the subdomain. If i try to access from domain the message forged appears ( In italian: "Questa richiesta è stata bloccata perché sembra essere forgiata." Il processo non ha ritornato contenuto.) 

    I check folder permission and it's ok. I try to apply other solution read in the forum (db, ecc..) but with no success.

    Can someone help me?



  9. Hi all

    i've used Hannacode to include a php page with a form. The "action" of this form is to another page that have another php file include. Last php file get post var and print the result. The problem is that when i submit the form 8/10 the new page loading but site freeze. If i reload the page (and re-submit the form) it works. I don't know if it depends to hannacode or processwire.  I have another site on same server written in pure php but i never have this type of problem.

    Thank in advance.




    Below the result page php code:


        include (wire('config')->paths->templates.'_form-application-result.php');


    	foreach ($input->post as $k=>$v) {
          if ($v != '' && $k != 'g-recaptcha-response') {
            <div class="row">
                <div class="col-sm-3"><?= ucwords(str_replace('_',' ',$k)) ?></div>
                <div class="col-sm-9"><?= strtoupper($v) ?></div>


  10. 2 minutes ago, Sérgio said:

    No need, @Cesco. You can do this on your current installation.

    To use Italian as your default language on the frontend, and considering your want "example.com/" to open in Italian and "example.com/en/" to change to English, do the following:

    1. As this is a new installation, and you have no real data yet, delete all languages but the default one, of course. 
    2. Change the default language title to Italiano
    3. Upload Italian translation files to it
    4. Create a new language, name "en", title "English"
    5. Edit the homepage and set the "en" language as active and the url as  "en".


    Ok nice! thank you

  11. Hi everyone


    i'm new on ProcessWire. I download and install version 3 and it works very good. I choose multi-language site for my purpose and I install Italian language pack for admin. To set default admin language i choose it for admin user on setting menu and it works. I want to know if it's possible to set to default Italian language also for frontend. I try to set Italian language for guest user but don't work. I read something about a module, but i don't know i make it.


    Can you help me ?


    Thanks in advance.


  • Create New...