Jump to content

Siddhi Jagtap

Members
  • Posts

    29
  • Joined

  • Last visited

Everything posted by Siddhi Jagtap

  1. @d'Hinnisdaëlthat worked. I just removed the last line requiring controller.php and kept the one for admin.php there itself. Thanks a ton!
  2. I recently installed the Processwire Dashboard module (https://daun.github.io/processwire-dashboard/#/). After I added the hook code in site/templates/admin.php, even though I can see the dashboard, the 'Pages' page shows this error - Fatal error: Cannot redeclare _checkForMaxInputVars() (previously declared in wire/core/admin.php:line 96).' When I try to add a panel to show the Pagelist or simply try to access the subpages of any parent page, I see this error too. This error disappears when I remove the hook code from sites/templates/admin.php file. The code that the Dashboard module suggests we add to this file is as follows: wire()->addHookAfter('Dashboard::getPanels', function ($event) { /* Get list of panels */ $panels = $event->return; /* Add panels */ $panels->add([ 'panel' => 'collection', 'title' => 'News items', 'data' => [ 'collection' => 'template=news-item, limit=10', 'sortable' => true, ], ]); }); /* Make sure to add the hook *before* the default admin process */ require $config->paths->adminTemplates . 'controller.php'; Any suggestions on how to solve this? Thanks.
  3. I am new to PW and was trying to make a simple blog page for my website. The parent page lists previews and a few details of each blog while the child pages show individual blog posts. The rest works well but I am struggling with one small thing. I am using Vuukle for enabling commenting on the child pages. I have a comment count HTML element on each child page as below: <span class="vuukle-count" data=empty-text="No" name ="commentCount">0</span>Comments Now I need to be able to pass the value of the above element from each child page to display on the parent page. I am using a foreach loop on the parent page to pull other field data from the child pages and display therein. But since the commentCount is an element on the child html page, I am not sure how to display that on the parent page. Any help is appreciated. Thanks.
×
×
  • Create New...