Jump to content

Timo

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by Timo

  1. I had a similiar problem. My mistake was that I only unpublished the parent, not the actual pages that I queried for with get/find.
  2. Hey tpr, thanks a lot! I never noticed that checkbox before. And I don't understand why it was deactivated. But now it works
  3. Hi, I used multiple languages with ProcessWire in the past, but I never encountered this problem before: I have a template where all child pages (events) are listed. In German (default language) all events are visible, like they are supposed to be. But in English only one event is visible! The only difference I found is, that the visible event was created "by hand" via backend, and the other events where created by PHP API, because I imported the events ... Another effect is that trying to access the event URL in English leads to the 404 Error page. But when I'm logged in as admin, I can access the URL. Accessing the German version always works. It feels like the events are only published in German, but not in English? The rest of the page works fine in both languages, only the events are showing this weird behaviour. -> Is there anything special to take care of when creating pages via PHP API for multi page websites? -> Has somebody any idea what could be the cause of this? I'm stuck ...
  4. Hey, great module! Any chance of using the predefined crops via the CKEditor Image Tool? There is even a button for cropping, but it's just the default cropping tool.
  5. solved it with this hook from InputfieldPageTableExtended: $this->addHookBefore('InputfieldPageTableExtended::renderTable', $this, 'nl_markup_filter');
  6. Hi, I'm using PageTableExtended to give my customer the ability to build modular newsletters in the backend. Historically, I use TemplateTwigReplace in my templates. I'm also using a custom Twig Filter to fix some markup issues. Works like a charm, except for one thing: When I save an edited section in the PageTableExtended Admin View, the "edit"-layer closes, but the changes won't become visible, because I get a server error: Error: Exception: The filter "nl_markup" does not exist in "newsletter/nl_header.twig" at line 13 So during the ajax update on save, my custom twig filter doesn't seem to be available yet. I hooked my custom filter init to the following hook: $this->addHookBefore('PageRender::renderPage', $this, 'nl_markup_filter'); I hope this isn't too confusing to follow along. Can someone point out a better hook to hook in? Apparently the Twig Module doesn't come with any hooks.
  7. Okay, I guess that's too advanced for my basic processwire and php knowledge. Probably I don't get what you are trying to tell me. This doesn't work either: $tpls = $this->templates->find("name^=page-"); $items = $pages->find("template=$tpls"); Thanks anyway, I resign and stay with my foreach-loop.
  8. Thanks for your answer, looks clever, but you cannot use $templates in the "Custom PHP code to find selectable pages". template.name^= doesn't work, either. I got my solution now, but I think this is more complicated than it should be.
  9. Hi, I'm looking for help with my page field selector. I want a field which allows me to select internal pages to link to. I have a strict naming, where all relevant page templates for this case begin with "page-" . So I would love to do something like this: template^=page- but the system tells me this is not allowed. Same for template%=, template*= etc. Edit: I solved it now with a custom php snippet. This works, but maybe there is a more elegant solution? $tmp = new PageArray(); $all = $pages->find('id|has_parent=1'); foreach( $all as $p ) { if( strpos($p->template->name, 'page-') === 0 ) { $tmp->push( $p ); } } return $tmp;
  10. Oh, I didn't know it's a default php function. I enabled the module in my php.ini, now everything works fine. Thanks for the help!
  11. Hi Alessio, when I try to access the modules configuration page I get the following error: Error: Call to undefined function _() (line 84 of C:\Work\sgh\website\htdocs\site\modules\Processwire-site-indexer-master\Indexer.module) Am I missing some dependencies here?
×
×
  • Create New...