• Content count

  • Joined

  • Last visited

Community Reputation

85 Excellent

About ottogal

  • Rank
    Sr. Member
  • Birthday 06/18/1949

Profile Information

  • Gender
  • Location

Recent Profile Visitors

2,068 profile views
  1. Hi VirtuallyCreative, instead of $homepage = $pages->get('/'); foreach($homepage->and($homepage->children) as $child) { you might try this $homepage = $pages->get("/"); $children = $homepage->children; $children->prepend($homepage); foreach($children as $child) { (Found in this thread.)
  2. Hi all, this article on CSS-Tricks: Transparent JPG (With SVG) might be of interest for some of you. Kind regards ottogal
  3. Hi Jon, nearly a year ago you asked a $session related question. There were some hints in the answers, weren't they?
  4. Thanks mr-fan - that seems to be a nice idea! I for sure will take a nearer look into it - after my actual problems hopefully will be solved... (I've got a similar Hanna Code to display a Video, using the jQuery plugin VideoJS - which mostly works well, but not on some mobile devices, e.g. on WinPhone 8 or iPhone...)
  5. Thank you, Robin S. It's so easy to make CKEditor get worried. Your trick prevents the warning message, so it looks less worrying to me...
  6. Hi all, distracted for a while by other (bigger) problems, I now came back to the situation discussed here in this thread in october: For my Hanna Code call [[mp3 audio='LINK']] now I have this Hanna Code (mp3.php): (and all works fine - ) <?php $a = new SimpleXMLElement($audio); $pagelink = $a['href']->__toString(); $pagename = basename($pagelink); $ap = $pages->get("template=audio,parent=audiopool,name=$pagename"); $link = $ap->mp3->url; ?> <div class='block'> <audio controls width='400'> <source src='<?= $link ?>' type='audio/mp3'> </audio> </div> <p><?= $pagename ?></p> But when I open the Hanna Code in the editor and click the button "Save & Test", I get the following messages: The line number refers to the file ....../site/assets/cache/HannaCode/mp3.php where the line and a blank line are prepended - so the line in question is, of course: What is wrong with the code, and how can I get rid of these Warnings? Thankful for some clarification: ottogal
  7. I would like to join, but only beyond 9th of january.
  8. Great! That for sure is a candidate for the Site of the Week...
  9. BTW: Shouldn't that be $pages->find( So that naming is rather misleading. A proposal (written just here, not tested): foreach ($categ_team as $categ) { $content .= "<h2><a href='{$categ->url}'>{$categ->title}</a></h2>"; $cat_members = $page->find("template=member, featured=0, categ_team=$categ"); $years_start = array[]; foreach ($cat_members as $cm){ $years_start[] = $cm->date_begin; }; $years_start = $years_start->unique(); foreach ($years_start as $y){ $content .= "<h3>{$y}</h3>"; //or apply some formatting to the $y value $members = $cat_members->find("date_begin={$y->date_begin}"); foreach($members as $m) { $content .= "<h4><a href='{$m->url}'>{$m->title}</a></h4>"; } } } Edit: Small correction.
  10. I'm guessing: The 2013 sub-list is showing up twice, because there are 2 members having this date_begin - and if you had 3 of them, it would show up three times...? $years = $page->find("template=member, categ_team=$categ"); I think this PageArray will contain each year several times - one for each member having the same date_begin. You could try $years = $page->find("template=member, categ_team=$categ")->unique();
  11. Hi all, the renowned German magazine for computer tech, c't, in its most recent issue #25/2016 is presenting several "WorldPress alternatives", and ProcessWire is among them. (My translation.)
  12. Since you use 'item_tpl' => '<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false" aria-controls="navbar" href="{url}">{title}</a>', these classes of course will be added to all the <a> elements, independent of the <li> having has_children or not. The point is that the class has_children is an optional class for the <li>, not for the <a>. So a workaround could be changing the CSS. Assuming your class dropdown-toggle is defined like this: a.dropdown-toggle { /* your styles here */ } Then change this to li.has_children > a { /* your styles here */ } So your styles are applied just to those <a> elements which are direct children of a <li> element having the has_children_class. (Didn't try it, just written here...) A quite different (and way more complicated) approach would be the use of the "hook for custom item string (new in 1.2.0)" - see the README of
  13. Thanks to both of you for the clarification. I'll give it a try.
  14. Great idea. Just a thought: Couldn't it be overkill to pass the whole $page object to the function (in case it has a lot of properties&methods, and the file to render needs just a few of them)?
  15. Why didn't you try what Robin S proposed above: