Jump to content

onjegolders

Members
  • Posts

    1,147
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by onjegolders

  1. Thanks Macrura, this looks like a really clever approach. Love the name "email thing" by the way ;)

    Still not sure if this is being triggered by creating something in the backend, whereas I am more talking about triggering emails via a signup form or that sort of thing.

    Then again it's getting late in the afternoon and my brain is a bit fuzzled :D


    There is a way, and it works exactly as you described :D Only your syntax is slightly off. You need to pass an array like so (or prepare it beforehand):

    $SomePage->render('optional_non-default_template.php', array('recipient'=>'Mr. North'));

    Then on that page’s template you can simply call $options['recipient'] and it will === 'Mr. North'.

    Wow, did not know that, I need to go back to the docs :D

  2. Thanks Horst, yes it's not quite the same approach as you say. I'm going to have another think.

    Am just wondering if there is some way of sending new variables to a render operation?

    Something link

    $data = [

        'name' => $input->get->name;

        'email' => $input->get->email;

    ];

    $email_message = $pages->get("template=email_template")->render($data);

    // send email with message

  3. Hey guys,

    Was just interested in your different techniques for sending HTML emails through your templates. More specifically, where you store your email codes?

    In the past, using smaller, simpler emails I was "OKish" with keeping all the HTML garbled in my form processing at the top of a page but am thinking there must be better ways surely?

    Do you use includes? ProcessWire templates? Just interested in seeing your different techniques. 

    • Like 1
  4. What drew me to PW was the similarities in fact with EE. But where EE was frustrating me with seemingly required paid addons and an unsure future, ProcessWire just seemed to take all that was good about it and improve it massively. Everything just seems so *sensibly* thought-out.

    The big stumbling point was the "everything is pages" approach, which makes development so much easier now but did (and still does occasionally) cause some scratching of the head.

  5. Currently working with Trello and Slack (and Dropbox, always Dropbox :))

    Interestingly Slack's integration of Trello is phenomenal. It's instant, not quite sure how they're managing it but pair a Trello board/card with a Slack channel and updates are immediate.

    Occasional use of Invision for showing work / getting feedback from clients but depends on the client / project.

  6. Hi Peter,

    I think PW has been growing rapidly for a while now. Its featuring heavily on CMS Critic and its subsequent winning of an award has probably sped things up somewhat also but yes the other reasons are also absolutely true!

    • Like 1
  7. MademyDay, this is a fantastic addition to the sytem, thanks for all your hard work.

    Just a question, do you personally see this more as something where you'd try and fully replicate your front-end output or just a means of displaying things in the backend in a more pleasing way? (I guess answer is probably both...)

  8. Just use the wonderful CropImage module. Say, you have a 300x300 image in your template. Define one 300x300 called "thumb" and one 600x600 crop called "thumb2x". Now you can use the picture polyfill like this:

    <picture>
    
    	<img srcset="<?= $page->myimage->eq(0)->getThumb('thumb') ?>, <?= $page->eq(0)->myimage->getThumb('thumb2x') ?>, 2x" alt="<?= $page->myimage->eq(0)->description ?>">
    </picture>
    

    Adding additional breakpoints with <source> is also possible (from the picturefill docs):

    <picture>
    	<!--[if IE 9]><video style="display: none;"><![endif]-->
    	<source srcset="examples/images/large.jpg, examples/images/extralarge.jpg 2x" media="(min-width: 800px)">
    	<source srcset="examples/images/small.jpg, examples/images/medium.jpg 2x">
    	<!--[if IE 9]></video><![endif]-->
    	<img srcset="examples/images/small.jpg, examples/images/medium.jpg 2x" alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia">
    </picture>
    

    So you can also do some art direction where you output not only different sizes but also different formats (for example 2:1 on mobile, 1:1 on desktop etc)

    This works great, though still trying to find a way that combines background images (for their ability to cover/contain) and PHP foreach loops (to make it a slider). I think for now combining a data attribute and JS is the only way to go.

    If only you could use @media queries inline.

  9. Hi Hafa,

    Definitely a good fit but you'll end up doing a lot of coding yourself but then again you would on any other framework.

    I've managed to do most of those things on an application made in PW so ask away if you get stuck on any one element.

  10. I completely agree Jacmaes, my only regret is that for the past 12 months or so sites I build tend to either be very simple and where this would be overkill for content editors or complex applications where the backend is hardly ever used.

    Would love to get an opportunity to work with it on a site.

×
×
  • Create New...