Jump to content

Anna

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Anna

  1. Anna

    MarkupSrcSet

    Thank you! It works like this: <img <?php echo $page->images->first()->srcset('featured-image'); ?>>
  2. Anna

    MarkupSrcSet

    It works perfectly well: <div <?php echo $page->images->first()->bgset('hero'); ?>>Lorem ipsum</div> Call to a member function srcset() on a non-object <img <?php echo $page->featured_image->srcset('featured-image'); ?>> What should I do?
  3. Thank you! This is very useful because I'm not a php expert. Welcome everyone!
  4. Thank you! <?php foreach($page->kat_page as $item) { //$item = kategoria $rec = $pages->find("kat_page=$item, id!=$page"); foreach($rec as $key) {//kategoria->recept echo "<div class='col-md-6 col-sm-6 col-lg-4'><div class='rec_item'>"; foreach($key->images as $image) { echo "<div class='img'><img class='resize' src='{$image->url}' alt='{$key->title}'></div>"; } echo "<div class='desc_area'> <a class='title' href='{$key->url}'>{$key->title}</a> <div class='desc dot is-truncated'>{$key->summary}</div> </div> </div> </div>"; } }?> Are you okay? Not much for forearch, can it be better?
  5. How to FieldtypePage category as blog? Home - receptek - recept - recept - recept - kategorak - kategoria - kategoria - kategoria recept.php <?php foreach($page->kat_page as $item) { //$item = kategoria echo "<h3>$item->title</h3>"; //kategoria->recept??? }
×
×
  • Create New...