-
Posts
339 -
Joined
Everything posted by ottogal
-
How to get PageTable pages when not published
ottogal replied to alexcapes's topic in API & Templates
Do you really need to unpublish the page? Why not just hide it?- 9 replies
-
- 1
-
-
- pagetable
- unpublished
-
(and 1 more)
Tagged with:
-
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.
-
That's it (of course!)... (Although I'm quite sure to have tried type File too.) Thank you, BitPoet, for your time.
-
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?
-
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.
-
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...
-
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);
-
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("
-
Page Field vs. PageTable Field differences
ottogal replied to Jonathan Lahijani's topic in General Support
Thank you @bernhard, that was really fast... I'll dive into it and try to understand. -
Page Field vs. PageTable Field differences
ottogal replied to Jonathan Lahijani's topic in General Support
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.) -
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.
-
Thanks! Looking forward...
-
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');
-
Try this: <title><?php echo $page->get("seo_title|title") . " | " . $config->httpHost; ?> See https://processwire.com/api/variables/config/
-
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.)
-
Danke, LostKobrakai.
-
Thanks mr-fan, I'll try.
-
@MadeMyDay What about the compatibility of PageTableExtended with PW 3.0.x devns?
-
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.)
-
@LostKobrakai It should be like this, shouldn't it? $page->parentsUntil("hero_gallery.count>0") If not, could you explain it a bit further?
-
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.)