Jump to content

Gayan Virajith

Members
  • Posts

    58
  • Joined

  • Last visited

Community Answers

  1. Gayan Virajith's post in Exclude user's current language (from list) was marked as the answer   
    Hi Bueno,
    Try this 
    foreach($languages as $language) { if(wire('user')->language->id == $language->id) continue; // skip current language if(!$page->viewable($language)) continue; // check if page not published for this language $url = wire('page')->localUrl($language); $title = $language->getUnformatted('title')->getLanguagevalue($language->id); $name = $language->get('language_name'); $location = $config->urls->templates; echo "<li>$title</a></li>"; }
  2. Gayan Virajith's post in Images in a repeater field was marked as the answer   
    Hi, 
    This might be helpful to you.
    <?php foreach($page->home_bullets as $bullet): ?> <div class="col group"> <?php // get the very first image from images list since image field is accepting multiple images (unless you change the value of `Maximum files allowed` under Fields > images > Details tab > Maximum files allowed). $image = $bullet->images->first(); ?> <div class="col first"><img src="<?php echo $image->url; ?>" alt="<?php echo $image->description; ?>"></div> <div class="col second"><span><?=$bullet->body ?></span></div> </div> <?php endforeach; ?> Thanks
  3. Gayan Virajith's post in How to use InputfieldImage as Configurable input field under a module was marked as the answer   
    Thank you Ryan. I appreciate your advise. 
×
×
  • Create New...