Jump to content

cssabc123

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by cssabc123

  1. Why is field greyed out in add field?
  2. What if I have a large dataset already that I need to access/fetch then render in html? How do I access records in that database and render in html? PDO or ORM? Or is there a Processwire way?
  3. Why the header and footer comes after body when rendered? (Planets Tutorial). The planets who are using the planet.php template are children of a page Planets which is based on basic-page.php template. The About page children pages works fine though. site/templates/planet.php <html> <head> <title><?php echo $page->title; ?></title> </head> <body> <h1><?php echo $page->title; ?></h1> <h2> Type: <?php echo $page->planet_type; ?>, Age: <?php echo $page->planet_age; ?> years </h2> <p><?php echo $page->planet_summary; ?></p> </body> </html>
  4. I don't see where the main menu rendered in basic-page.php but it does in the default theme installation. Where is it? <?php // basic-page.php template file // See README.txt for more information // Primary content is the page's body copy $content = $page->body; // If the page has children, then render navigation to them under the body. // See the _func.php for the renderNav example function. if($page->hasChildren) { $content .= renderNav($page->children); } // if the rootParent (section) page has more than 1 child, then render // section navigation in the sidebar if($page->rootParent->hasChildren > 1) { $sidebar = renderNavTree($page->rootParent, 3) . $page->sidebar; }
  5. In the $content .= renderNav($page->children) I was expecting a submenu like a dropdown but it's a. Now how do you make a dropdown menu using the Processwire way? Or just code like usual HTML5/CSS3 li, ul tags using "foreach ($page->children as" construct?
  6. Ok thanks again diogo. I got what your saying.
  7. Does Processwire have a built-in ORM if not what is the recommended ORM for it?
  8. Unlike the tutorial example HelloWorlds (http://processwire.com/docs/tutorials/hello-worlds/) about the planets Earth and Jupiter. Is there a way to pass data to a Processwire page coming from 1) MySQL database or 2) Another Processwire page? That way I can have a database table of planets and just create one or two pages. One page if I had a dropdown of planets then output planet data on same page when a planet is chosen from the dropdown. Maybe 2 pages if I implement a holder/page pattern where the holderpage will have links of planets, and once a planet link is clicked, fetch planet data from the database for info then output fetch data to a detail page?
  9. Thanks a lot diogo! Just a follow up question. that means the children pages are unpublished but still created. so if i had 100 child pages I need to create 100 pages? Any way to make only 1 page then dynamically create the detail from a database using Processwire?
  10. Hi, How do you implement a holder/page pattern in Processwire. The idea is simple. One page type manages the list view, and usually contains very little native content. The primary function of this page is to provide a list of its child pages, providing a brief summary for each one, along with a link to its detail view. A second page type will represent the detail view for any given child page, which will typically have a custom template and content fields that make up its identity. Think of it think like a news listings, image galleries, even a Twitter timeline.
×
×
  • Create New...