Jump to content

wishbone

Members
  • Posts

    146
  • Joined

  • Last visited

Everything posted by wishbone

  1. omg, that's it! unpublished children don't show. (which is sensible) Big thx! yes, thank you, shows! But why? Why do old pages show without? Anyway, now not published pages show as well.
  2. very strange behaviour: - pages created before work and render foreach data. - new pages with the same template show header and footer and nav ok, but don't render foreach-data any more. - foreach-data in the head-navigation is rendered ok. - child pages (without foreach) work ok I checked and compared all settings. Must be a very stupid simple setting. I'm confused. Any idea, where else I could look? this is the code for the template: <?php include('_head.php'); // include header markup foreach ($page->children as $child) { echo "<section>"; echo "<div class='contentWrap uebersicht'>"; echo "<a href='$child->url'><h1>{$child->arbeiten_block->first()->headline}</h1>"; if($child->teaserBildTh) echo "<p><img src='{$child->teaserBildTh->url}' alt='{$child->teaserBildTh->description}' class='bildNeben'></p>"; echo "<p>{$child->arbeiten_block->first()->details}</p></a>"; echo "</div>"; echo "</section>"; }; include('_foot.php'); // scripts ?>; thx!
  3. sry, very old thread ๐Ÿ˜‰ but this doesn't work for me, throws this error: "Fatal Error: Uncaught Error: Call to a member function render() on null in site\assets\cache\FileCompiler\site\templates\basic-page.php:54"
  4. found the code! In a post from 2011 ๐Ÿ˜‰ thx to @BDH Does exactly what I want: show the whole tree, but only render submenus of a current item. Could have achieved that with css also, but semantically, not that clean. Now I tried to prepend the homepage like this (before the "foreach"), but doesn't work: $rootPage->children->prepend($rootpage); What am I doing wrong? Anyway, I don't understand the $s=str_replace thing - works, but as I'm trying to learn from examples, would be nice to understand what that is. There are still two modules: MarkupMenu and Menu Builder - but they seem to be overloaded for this simple task?
  5. Same problem here: render submenus only for the current page. Instead of Smirftsch's above, I tried the following (I have a non-$out-versionn of the RenderNavTree): // if the item has children and we're allowed to output tree navigation (maxDepth) // then call this same function again for the item's children $currentItem = $item->id == wire('page')->id; if(($item == $currentItem and $item->hasChildren())) { renderNavTree($item->children); and I call the function like so: <aside id='sidebar'><?php // rootParent is the parent page closest to the homepage // you can think of this as the "section" that the user is in // so we'll assign it to a $section variable for clarity // instead of $section, render the whole tree, beginning from the homepage $home = $pages->get('/'); // if there's more than 1 page in this section... if($home->hasChildren > 1) { // output sidebar navigation // see _init.php for the renderNavTree function renderNavTree($home, $maxDepth = 2); } // output sidebar text if the page has it echo $page->sidebar; ?></aside><!-- end sidebar --> only renders "Home" ๐Ÿ˜’ (I'm a non-coder anyway...)
  6. Same question here. Was so happy to find a plugin for photoswipe. Even with "Petersburger Hรคngung" just great! But since there are no answers to the PHP7.4 problem, I won't waste time to find out ๐Ÿ˜’
  7. it's a live site and that's why: I get that error now and not later, when everything is done and doesn't work on the server...
  8. cleared everything and reinstalled the intermediate edition (first install was blank edition) exactly the same way on the same place... which was easy and fast, only that error...
  9. Hello again, after I got the "blank" version running, I rather wanted to see the "Intermediate"-version. Install allright - last step showed this error: Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /htdocs/wire/core/Session.php on line 247 Warning: session_name(): Cannot change session name when headers already sent in /htdocs/wire/core/Session.php on line 251 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /htdocs/wire/core/Session.php on line 257 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /htdocs/wire/core/Session.php on line 258 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /htdocs/wire/core/Session.php on line 259 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /htdocs/wire/core/Session.php on line 260 Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /htdocs/wire/core/Session.php on line 272 though I can continue flawlessly, but I don't want to run into problems further on... This topic https://processwire.com/talk/topic/22559-warning-ini_set-session-errors/ says something about PHP Beta version, but I run stable 7.4. btw: everything is very well explained in these example versions, which is a big step forward to when I last used pw (2013 ๐Ÿ˜‰ )
  10. you are so kind! OT: I actually haven't done many pw-sites, the first 2013. I would like more users to use PW, but for wordpress users, e.g., it's too difficult, unfortunately. But only 1 example: when it comes to split menues (submenu on a different place than main menu), almost any other cms fails. Of course, for more complex sites, e.g. with collecting of data according to a property, you need more. Anyway, nowadays clients want sites only in this "bootstrap style"; so page builders are fame, and customers don't appreciate individual looks. That's my experience, at least. Who needs processwire, then? </rhetorical question> And yes, that's not a matter of the underlying system but of the templates. But all the popular CMSes come with such templates. Which is, probably, the biggest manko that keeps WP users off PW. I would like to see PW used more, it's, even for me, so beautiful!
  11. Oh? I thought it was just PERFECT ๐Ÿ˜‰ and even for a non-developer with no php skills what so ever it opens all possibilities - but only with help. After encountering those very small initial problems I would have already left pw - without your help.
  12. couldn't find it so I **update** can't change the title... With this section removed, PW doesn't detect mod_rewrite: # 8B. Set an environment variable so the installer can detect that mod_rewrite is active. # ----------------------------------------------------------------------------------------------- # Note that some web hosts don't support this. If you get a (500) error, try commenting out this # SetEnv line below. <IfModule mod_env.c> SetEnv HTTP_MOD_REWRITE On </IfModule> Without this help, a person like me wasn't able to use processwire.
  13. thx everybody! was my bad ๐Ÿ˜ณ I had the SetEnv deleted - thought it wouldn't be there any longer (thread is almost 10 years old ๐Ÿ˜‰ ) when I searched for it (suggestion in above mentioned thread). I'm happy to get help so easily! btw: how can I flag this thread as solved?
  14. thx Bill! commented out "Options" and mod_php5 sections, but unfortunately, no cure. still red alert "can't check if mod_rewrite is enabled" ๐Ÿ˜’
  15. I'm still in the beginning of the install process. PW checks for compatibility. Though mod_rewrite is definitely enabled, it can't find it: "Unable to determine if Apache mod_rewrite (required by ProcessWire) is installed. On some servers, we may not be able to detect it until your .htaccess file is place. Please click the 'check again' button at the bottom of this screen, if you haven't already." I checked again, tested, and the hoster also says, mod_rewrite is always enabled. Anyway, I redirect already non-www Urls to www and such which works. I don't want to continue with this issue... (pw latest edition 3.0.165, PHP 7.4, MySQl 5.7. Shared hosting (strato).)
  16. lots of new things! yes, duplicator could help, but I'm not doing pw-sites very often, so I stick to the live server for now. Next problem occurs: ## started a new topic ## "Unable to determine if Apache mod_rewrite (required by ProcessWire) is installed. On some servers, we may not be able to detect it until your .htaccess file is place. Please click the 'check again' button at the bottom of this screen, if you haven't already." I checked again, tested, and the hoster also says, mod_rewrite is always enabled. Anyway, I redirect already non-www Urls to www and such which works. I don't want to continue with this issue... All these problems keep "Wordpress people" away from pw - so sry, b/c I myself, though a non-developer, like it so much and would wish it more popularity.
  17. thx again! hope not to run in more problems because of this. At the moment, I can't do anything, I suppose. It's strato, as mentioned above. Usually I use domainfactory. There are much more options for everything there. I don't test on a local system b/c of possible problems with transfering, and I'm not a hero with the settings.
  18. thank you so much for your fast and thorough help! After hours of trying and testing, the solution is somewhat spooky: index.php opens if not specified in the URL, like so: domain.de opens index.php (and install.php successively), domain.de/index.php throws the above 404-error. I had index.php written in the URL because its a running site, with DirectoryIndex index.html btw: pw latest edition 3.0.165, PHP 7.4, MySQl 5.7. Shared hosting (strato).
  19. Hello, after a long time building again a site on processwire. I'm not a developer but had always fun working through processwire. But I didn't ever have such problems: Only uploading files and calling index.php throughs the error: "404 page not found (no site configuration or install.php available)" Calling install.php directly works fine, but I would like to eliminate the error for not to get problems because of misconfiguration later on. I tried with and without RewriteBase / , also tried to abandon the 1. Apache Options section - no result. Thanks!
  20. thx a lot looks great - unfortunately, I don't have access to files at the moment, so feed back will take some time... (btw would be helpful if PW had a possibility to access files and edit them via browser as well) as for the flexboxes - what makes them so appealing is the ability to align the boxes independent of their width and distance. Percents do not equal apply if you have margins and paddings in pixels...
  21. thx! sry doesn't work. I can't see where the number of $box is counted...
  22. but where is the variable $box_count defined? I can't set it to 0 before having $box defined. Obviously, I don't know how to define $box_count or the number of $box. Your original code example doesn't match my structure. I tried to adapt it to my varables. Is it foreach or for each?
  23. oh how great, thank you for the excessive lesson! But still doesn't work. This is what I have: <?php foreach($page->projectBox as $box) { $box_count = 0; if ( $box_count == 3 ) { // start a new line echo "<br>"; $box_count = 0; } else { echo "<div class='projektbox'>"; ... echo"</div>"; $box_count = $box_count + 1; } } ?> what is this underscore in $box_count? The divs are flexboxes which are "floating" by definition.
  24. Thank you for your answer, but css doesn't limit the number of boxes in a row. Sry for bothering you with non-programmers' questions - what syntax do I need? if (count($page->$box)<3 | count($page->$box)>3) { is also not working
  25. Hallo, for a number of floating flexboxes I want to limit the number of them in each row. This is what I tried : <?php foreach($page->projectBox as $box) { if (count($box)<3 | count($box)>3) { echo "<div class='projektbox'>"; echo "<h2>{$box->boxTitle}</h2>"; echo "{$box->boxText}"; echo"</div>"; } if (count($box)=3) { echo "<br>"; } } ?> Which throws a 500 error... any help, pls? Thank youuu!
ร—
ร—
  • Create New...