Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

42 Excellent

1 Follower

About lokomotivan

  • Rank
    Jr. Member

Recent Profile Visitors

1,254 profile views
  1. No segments defined, "just Allow URL Segments?" option checked. When i uncheck it, it start counting Edit: Otherwise works great, thank you for this module
  2. It doens't work if you have have "Allow URL Segments" option enabled on the template, at least not in my case. Can this be fixed?
  3. You could check if speaker exists, but why do you have empty speakers in backend? In this case you can check for title or thumb or any requierd field <?php foreach($page->speaker as $speaker) { if(!empty($speaker->photo) { // speaker markup } } :
  4. Maybe u can try putting "./" in your filter form action link ./?studio=london <a href="./?studio=london">London</a>
  5. You can use JSON.stringify(data) Edit: Sorry ddint read ur post entierly :). Why dont u for example add data="<?=item->id?>" attribute to each button, then in ur script get the value var itemId = $(this).attr("data"); var data = { id: itemId, }; $.ajax({ type: "POST", url: "/intra/status/", data: JSON.stringify(data), success: function(){ console.log(itemId); } });
  6. Try this: <?php $get_field = $fields->get('some_field_name'); $field_options = $get_field->type->getOptions($get_field); foreach($field_options as $option) { // }
  7. +1 on SamC suggestion, laragon is great! Im also using vagrant and https://box.scotch.io/ now. full ubuntu enviroment out of the box, in combination with https://github.com/deveres/vagrant-manager-windows
  8. <?php echo $pages->get('/shopping-cart')->url ?> your request not hitting the page, you need: <?php echo $pages->get('/shopping-cart/')->url ?> or to make sure u always get the right page even if you change name: <?php echo $pages->get('template=your_shopping_cart_template')->url ?> And dont forget in your shoppping-cart template to check for ajax request: <?php if($config->ajax) { // page was requested from ajax }
  9. Ive done something simular recently, well not sure if this is what u looking for: Simple markup (number in a class represents opacity level) <div class="tm-overlay-dark-60"> <img src="" /> </div> If u want to use it with background image, just need to define height <div class="tm-overlay-dark-60" style="height:500px;background:url(./myimage.jpg) center center no-repeat;backgroudn-size:cover;"> </div> I usually use uikit framework and less @tm-overlay-dark-bg: #000; @tm-overlay-light-bg: #fff; /** * TM Overlay BG */ [class*='tm-overlay-'] { position:relative; } [class*='tm-overlay-']:before { content: ""; display:block; position: absolute; top:0; bottom:0; left:0; right:0; background: fade(@tm-overlay-dark-bg, 60%); z-index:0; } /** * Dark */ [class*='tm-overlay-10']:before, [class*='tm-overlay-dark-10']:before { background: fade(@tm-overlay-dark-bg, 10%); } [class*='tm-overlay-20']:before, [class*='tm-overlay-dark-20']:before { background: fade(@tm-overlay-dark-bg, 20%); } [class*='tm-overlay-30']:before, [class*='tm-overlay-dark-30']:before { background: fade(@tm-overlay-dark-bg, 30%); } [class*='tm-overlay-40']:before, [class*='tm-overlay-dark-40']:before { background: fade(@tm-overlay-dark-bg, 40%); } [class*='tm-overlay-50']:before, [class*='tm-overlay-dark-50']:before { background: fade(@tm-overlay-dark-bg, 50%); } [class*='tm-overlay-60']:before, [class*='tm-overlay-dark-60']:before { background: fade(@tm-overlay-dark-bg, 60%); } [class*='tm-overlay-70']:before, [class*='tm-overlay-dark-70']:before { background: fade(@tm-overlay-dark-bg, 70%); } [class*='tm-overlay-80']:before, [class*='tm-overlay-dark-80']:before { background: fade(@tm-overlay-dark-bg, 80%); } [class*='tm-overlay-90']:before, [class*='tm-overlay-dark-90']:before { background: fade(@tm-overlay-dark-bg, 90%); } /** * Light */ [class*='tm-overlay-light-10']:before { background: fade(@tm-overlay-light-bg, 10%); } [class*='tm-overlay-light-20']:before { background: fade(@tm-overlay-light-bg, 20%); } [class*='tm-overlay-light-30']:before { background: fade(@tm-overlay-light-bg, 30%); } [class*='tm-overlay-light-40']:before { background: fade(@tm-overlay-light-bg, 40%); } [class*='tm-overlay-light-50']:before { background: fade(@tm-overlay-light-bg, 50%); } [class*='tm-overlay-light-60']:before { background: fade(@tm-overlay-light-bg, 60%); } [class*='tm-overlay-light-70']:before { background: fade(@tm-overlay-light-bg, 70%); } [class*='tm-overlay-light-80']:before { background: fade(@tm-overlay-light-bg, 80%); } [class*='tm-overlay-light-90']:before { background: fade(@tm-overlay-light-bg, 90%); } Maybe u need to change :before z-index if you dont use image as background image
  10. https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
  11. I think you just have to remove the parent=1018 from your selector, doctor page cant be child page of multiple locations... $doctors = $pages->find('template=staff-page,locations=$page'); foreach($doctors as $doc) { echo "<h4>$doc->title</h4>"; }
  12. Just installed it, first thing i noticed that it doesn't work with custom hanna tags, works with "[[", but not with custom one "{{" i currently use for hanna codes
  13. This seem exactly what i need at this moment, especially for hanna :), will try it out definitely, thank you!
  14. You need to echo image html and use image field as a src attribute. Processwire doesn't add any html to the front-end, 0, but it provides you everything you need. In this case, lets say you have image field on a page: <?php $page->image // will get you jsut image name my_image.jpg $page->image->url // will get you image path site/assets/files/1234/my_image.jpg ?> <!-- and here full image --> <img src="<?= $page->image->url ?>" />
  15. Not sure if this can help, but this is how i handle csv inport/export with pw: https://gist.github.com/lokomotivan/331aff00152b7cf2ac9b6605576e1e23
  • Create New...