Jump to content

arjen

Members
  • Posts

    1,222
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by arjen

  1. Hi @valan, you need something like this?

    $selector1 = "template=basic-page";
    $selector2 = "status=123";
    
    $mergedSelectors = $this->wire(new Selectors($selector1));
    $mergedSelectors->add($this->wire(new Selectors($selector2))); // Updated see comment valan
    
    // to output a PageArray
    
    echo $this->wire('pages')->find($mergedSelectors);
    
    // or to output the selector as string
    
    echo $mergedSelectors->__toString();
    
    // See: /wire/core/Selectors.php

     

    • Like 5
  2. First off I would suggest to call ProcessWire from one type of call. You use wire('fields') and $this->fieldgroups. I am not sure if $this will point to the module class or ProcessWire. You could check this out using a barDump in Tracy:

    bd($this);

    I would stick to $this->wire() so adding a new template:

    $this->wire(new Template);

    Or getting other stuff:

    $this->wire('fields');
    
    $this->wire('templates');
    
    $this->wire('etcetera');

    As an alternative you could check out this example.

    • Like 2
  3. 15 hours ago, abdus said:

    Yeah, WYSIWYG is very restrictive when you know what you're doing. Github Flavored Markdown + custom markup is a godsent for writings with lots of moving parts.

    Myself I am a big fan of Textile (coming from Textpattern years ago), but since Markdown has 'won' the battle I'm using this a lot too. Even some clients made the jump from WYSIWYG ^_^

    Good luck with your blog and looking forward to your tutorials.

    • Like 1
  4. Hi,

    Welcome to the forums. Sorry to hear you are having troubles saving pages.

    Can you post a screenshot of the template configuration (Tab: Basics) of the page you are trying to save? Also which version of PW, PHP and MySQL are you using?

    • Like 3
  5. Haven't seen those errors before. 

    Did you check the content of the database itself? Like are the tables (i.e. "pages") really there?

    Also, you say you upgraded from 2.4 to 2.8 and then you exported the site profile? Why didn't you upgrade directly from 2.8 to 3.x replacing the /wire/, index.php and .htaccess? I've upgraded many sites, but haven't ever used the site profile export/import construction.

     

    • Like 1
  6. Hey @alan,

    Right now I'm looking into storing logs with a tool. Since we have multiple installations running around I was also wondering if you were going to log the ProcessWire logs as well with logstash? Or just the server logs?

    Would you be so kind to share your experiences?

    Thanks!

  7. No issues here :)

    But since the amount of modules is (luckily) pretty small in ProcessWire I guess it would be wise to join forces instead of creating several modules with overlap. If 90% of the code is changed, I'm not really sure if a fork is appropriate, but it might be. I guess we have to wait until @netcarver joins the discussion.

    • Like 2
  8. <?php foreach ( $pages->find('template=calendar-post, limit=8, Start_date>=today, sort=Start_date') as $single ) : ?>

    You can use Start_date>=today as a selector to only show items with a Start_date that is either today or in the future.

    • Like 7
×
×
  • Create New...