Jump to content

gnome

Members
  • Posts

    23
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling
  • Location
    UK

gnome's Achievements

Jr. Member

Jr. Member (3/6)

1

Reputation

  1. Thank-you Soma! For mentioning the "navigation" field. It turns out that this is used to generate the menu, rather than just getting the page children. So you have to manually add the new page(s) to the navigation field for it to appear in the menu. Thank-you to all for your help and suggestions.
  2. Definitely on the right domain. I've taken a screen grab. This is what ProcessWire says: And this is what the code above outputs:
  3. Hi all I've been using ProcessWire for a while and am completely comfortable using it. BUT, for some reason, today I am unable to echo out a page link! I have a section (About Us), which did have 4 children. Today I have added a 5th child page, but it refuses to be added to the navigation. I've echoed out the count of children and it is coming back as 4, even though there are now 5. The page is published and saves fine. I've deleted it and re-added it, to no avail. Has anyone else ever had this issue? Any suggestions more than welcome! Code for generating menu is below. $navigation = $page->rootParent->navigation; if(count($navigation) > 0) { //echo count($navigation); foreach($navigation as $p) { $children = $p->children; //echo $p->url; //echo count($children); // count children (exclude certain templates) if(count($children) && $p->is("template!=news-page|team-page|development-land-page|sheep-sales-page|produce-sales-page|grass-keep-page|property-list-page|property-auctions-page")) { // accordion header ?> <a href="#" class="submenu<?php if($page->parents->has($p) || $p === $page) echo '-current'; ?>"><?= $p->title; ?></a> <?php // expandable sub-menu ?> <div class="sub-sub-links <?php if($page->parents->has($p) || $p === $page) echo 'active'; ?>"> <?php foreach($children as $child) { ?> <a href="<?= $child->url; ?>" <?php if($child === $page) echo 'class="sub-sub-links-current"'; ?>><?= $child->title; ?></a> <?php } ?> </div> <?php } else { // single page if ($page->parents->has($p) || $p === $page) { $class = 'sub-links-current'; } else { $class = ''; } ?> <a href="<?= $p->url; ?>" class="<?= $class; ?>"><?= $p->title; ?></a> <?php } }
  4. Hi I need to have a search form linked to my news articles. The fields I need are shown in the attachment Is this possible in processwire? Could someone give me pointers on how to go about this? Many thanks!
  5. I am using $parents = $page->parents; foreach($parents as $parent) { [indent=1]// do llinks[/indent] } to show breadcrumb links. The problem I have is that sometimes the parent page is a section rather than a page with content. For example, I have a section called About Us which contains various pages, but About Us is not a page itself. I could create an About Us page and have a meta refresh in it to go to the first page of that section, but is there a better way? Thanks!
  6. I think this $highlights = $pages->find("template=template-news, sort=-newsDate, highlight=1, limit=5"); is what I need. Thanks to all!
  7. I have a news articles list displayed: $articles = $pages->find("template=template-news, sort=-newsDate, limit=5"); Now I need to have a new page which shows some (but not all) of the news articles. What would be the best/easiest way to achieve this? Thanks!
  8. Thanks onjegolders, this sounds great. Will give it a go!
  9. Hi onjegolders It would be the simple version - a page where you display all your files under their respective heading (Brochures, Instructions)
  10. Thanks diogo. I think maybe I've confused things. What I'm trying to achieve is a page where I can add PDFs to a page. Each PDF would belong to a category. Then I would loop through and show Category Name PDF 1 PDF 2 PDF 3 Is this possible? Thanks!
  11. Hi I've just found the related pages tutorial: http://processwire.com/videos/page-fieldtype/ Is it possible to do something similar, but rather than choose pages, to choose files? Thanks!
  12. apeisa, thanks. I've tried what they suggest - still not able to upload a 25MB PDF!
  13. Hi I'm having trouble adding PDFs to my page. They are large files - up to 50Mb. They appear to be failing - the progress bar gets stuck on 99%. I have tried adding upload_max_filesize = 100M post_max_size = 100M to php.ini, but no luck. Has anyone else had this and found a solution? Thanks!
  14. I will check out the cheatsheet. Your code example is cleaner. I will copy this style from now on. Thanks again.
×
×
  • Create New...