• Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Peter Knight
      I have a PageReference field called related_random where my client selects a particular parent page in the tree.
      On the front end I then need to get a random child page of that page based on some selector values.
      At the moment I'm using a Matrix field and this outputs the page ID (1090) on the front end 
      <?php foreach($page->related_products as $item) { if($item->type == 'related_product') echo " {$item->related_random->title} "; } ?> What I can't get my head around (and what I really want to do to echo some values of that page IDs children 
      Essentially I want to get a maximum 1 random child page of 1090 with a template of product.
      The shoddy selector below is clearly wrong but correct in explaining what I want to do.
      $related_random->child->getRandom("template=product,limit=1") Don't know if that makes any sense? 
       
       
    • By rolisx
      Hi Everyone
      I have a problem here. I have built a site with Processwire on localhost and then transferred to my customer's server. a) it's a windows server (unfortunately) and b) there is a domain-mapping for this site, the domain points to a folder of another domain. Sorry, I can't explain it any better, I don't really understand the different types of servers (why do they have to be different anyway...).
      My problem is, that I see the main website but not the admin page. Do I have to add anything to my .htaccess file?
      I also tried to include web.config file. Not .htaccess nor web.config file have an impact when changing its content. I really have no clue what to do!!
      Links: mcconnellacademy.ch, mcconnellacademy.ch/admin
      Thanks for any pointing in the right direction!
    • By benbyf
      Hello,
      Does anyone know whether the is a place detailing the structure your admin theme should take when creating one? e.g. I see UiKit, Reno and Default admin themes all have default.php, init.php, controller.php files, is this a stylisitic choice or a prerequisite for any admin theme module?
      Thanks!
    • By gebeer
      Hello,
      on a fresh 3.0.62 install I have a page reference field 'mypages' with these settings for selectable pages:

      In my site/ready.php I have this hook:
      /** * custom page select */ wire()->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->name != 'mypages') return; $pages = new PageArray(); $pages->add($this->pages->get(1)); $ids = $pages->explode('id'); $event->return = $event->pages->getById($ids); }); On a normal page, the hook is working and the mypages field has only 'Home' in the select dropdown .
      But when I put the mypages field inside a repeater, it is not working.
      I have this problem on a project that is in development right now and have spent quite some time to try and find the reason. Then I made a fresh PW install to verify the behavior.
      No matter if repeater dynamic loading is on or off, the page reference field always returns the  set of pages defined by the settings in the page reference field. The hook is ignored.
      Can anyone please verify this and let me know so I can file a bug report. Also if you have an idea how to fix this, I would be happy.
       
    • By regesh
      I have to languages - english and russian.
      I need russian language to be set as default for admin panel. How to do it? Thanks!