Jump to content

ottogal

Members
  • Posts

    339
  • Joined

Everything posted by ottogal

  1. Shouldn't you choose a more telling title for the homepage? Somebody might bookmark it and would find just "Home"... Edit:
  2. Do you really need to unpublish the page? Why not just hide it?
  3. Thanks monchu, but it's not even needed: At a new start of PW obviously the file /site/assets/logs/errors.txt is restored automatically.
  4. That's it (of course!)... (Although I'm quite sure to have tried type File too.) Thank you, BitPoet, for your time.
  5. Erraneously I burnt the errors log under Setup>Logs - I wanted to clear it, but erased it permanently instead. How do I get it back?
  6. The filepage already exists. I used the code from Nico nearly literally. The explanation there is a bit short; so I'm not sure what Field Type the field should be. I tried URL or simple text for the filename, but these wouldn't give an object. Could it be Page Table? A Page Array - since a foreach is mentioned? A more detailed example would be helpful.
  7. Hi all, to upload a huge file I'm trying the workaround presented by Nico in his Troubleshooting Guide at the end of page 4. Running /tmp/uploadhelper.php I get the message Error: Call to a member function add() on a non-object (line 7 of ....../tmp/uploadhelper.php) where line 7 is $filepage->fieldname->add($config->paths->root.'tmp/hugefile.zip'); Of course fieldname is the name of a field I added to the template of the $filepage defined before. I tried to replace $filepage->fieldname with $filepage->get("fieldname"), to no avail. What do I have to do to change this into an object? Thankful for any hint...
  8. Since in my case there is only one pagetable field, I don't think that it matters that you have two of them. Strange enough, I think I had this issue a while ago and found a workaround - but don't remember what I did...
  9. I can confirm jüergen's observation (PW 3.0.35, but had it already in earlier versions). No second page table field present.
  10. This curly brackets syntax doesn't work in PW 3.0.24 (and not in the config settings for the PageList module).
  11. With the second option (using a checkbox) the handling would be easier in the case of non-member authors who later on may advance to member status. What about the output of the comma separated list of authors: The loop could be something like foreach ($authors as $a){ $out .= $a->lastname . " " . $a->firstname . ", "; } Then to remove the last two characters (", ") you just use a PHP string function: $out = substr($out, 0, -2);
  12. Could you reveal more details about your templates? (Their fields, etc.) And what is the structure of the CSV file? (First line of column titles, and a sample of the following lines) Edit: Wasn't that intended to be $author = $pages->find("
  13. Thank you @bernhard, that was really fast... I'll dive into it and try to understand.
  14. My question is the other way round: Could a PageTable have the option to limit itself to one row - like the choice of Simple Page for a Page field? (Or to limit it to a configurable number of rows.) Background: I would like to profit from the "presentation capabilities" of a Page Table field, but want to restrict it to a maximum of one Page (row). Chosen this option, there should be an Add new button only as long as the Page Table is empty. After adding 1 row, the button should disappear. (I would like to avoid the hook proposed by @Soma here - btw: I couldn't get it to work.)
  15. Hi Mel, I'm not sure I understand your intention in full. Assuming that "members" and "authors" are different entities, I would create templates for members, authors and publications. The publication template gets a multiselect pagefield to the authors, so you easily cover the case of more than one author of a publication. And yes, the members template contains a pagefield to the publications (multiselect too). What about the markup: That's a question of the template files, not of the templates.
  16. Thanks! Looking forward...
  17. Make the file /site/config.php temporarily writeable and add this line: $config->httpHost = 'domainname.com'; You can also add a "Whitelist" with the variants you want to allow in this way: $config->httpHosts = array('yourdomain.com', 'www.yourdomain.com');
  18. Try this: <title><?php echo $page->get("seo_title|title") . " | " . $config->httpHost; ?> See https://processwire.com/api/variables/config/
  19. It seems strange to me that in your screenshots of the Family settings of Template Categories none of the radio options is ticked. Something wrong with that? (Of course, the Categories page must have children allowed.)
  20. Danke, LostKobrakai.
  21. Thanks mr-fan, I'll try.
  22. @MadeMyDay What about the compatibility of PageTableExtended with PW 3.0.x devns?
  23. Installing the german lang pack for PW devns https://github.com/Manfred62/pw-lang-de-devns into PW 3.0.24, files like .gitattributes .gitignore README.md are not uploaded because of invalid file extension - allowed are .zip .json .csv only. Does this do any harm? (It seems to work anyway.)
  24. @LostKobrakai It should be like this, shouldn't it? $page->parentsUntil("hero_gallery.count>0") If not, could you explain it a bit further?
  25. Welcome to the community! Have a read of this thread. So you should try something like this: if (count($page->hero_gallery)>0) { $hero_images = $page->hero_gallery; } else { $hero_images = $page->parentsUntil("count(hero_gallery)>0")->hero_gallery; } (Just written in the browser, didn't try it myself.)
×
×
  • Create New...