Jump to content

buster808

Members
  • Posts

    69
  • Joined

  • Last visited

Everything posted by buster808

  1. Hi - have you used this with custom fields eg: repeater successfully? I have text slider using UIkit3 but can't get the auto height to work.
  2. Hi, I can view repeater content with a simple foreach loop. Can a limit be added with pagination to a repeater field? Some help in the right direction would be great. Thanks foreach($page->feedback_repeat as $feed ) { $content .= "<h2>{$feed->title}</h2>"; $content .= "<p>{$feed->feedback_body}</p>"; }
  3. got this working foreach ($page->images as $image) { $content .= "<div uk-lightbox>"; $content .= " <a href='{$image->url}'><img src='{$image->url}'/></a>"; $content .= "</div>"; }
  4. Hi, I have used a simple loop to show images in my template. How can I get this to link to a larger image possibly in a lightbox with arrows? Thanks foreach ($page->images as $image) { $content .= "<img src='{$image->url}'/>"; }
  5. got it working now by doing this - really need to learn php basics <?php $content .= "<div class='uk-child-width-1-1 uk-child-width-1-3@m' uk-grid>"; ?> <?php foreach ($entries as $entry) { $content .= "<div> <a href='{$entry->url}'> <h2>{$entry->title}</h2><h4>{$publish_date}</h4></a>"; $content .= shortText($entry->body, 100); $content .= "<br><a href='{$entry->url}'> Read More </a></div>"; } ?> <?php $content .= "</div>"; ?>
  6. Hi Dragan thanks for your help. <div class="uk-child-width-1-1 uk-child-width-1-3@m" uk-grid> wont output above the php tag. but adding the inline div was helpful just need to get the tag above to work. Pulling my last hair out ha
  7. Thanks for the reply ukyo Do you mean like this? sorry if Im being silly here. <div class="uk-child-width-1-1 uk-child-width-1-3@m" uk-grid> <?php foreach ($entries as $entry) { $content .= "<a href='{$entry->url}'> <h2>{$entry->title}</h2><h4>{$publish_date}</h4></a>"; $content .= shortText($entry->body, 100); $content .= "<br><a href='{$entry->url}'> Read More </a>"; } ?> </div>
  8. Hi, I have the PHP code below which creates my blog list into rows. How can I use UiKit to create the content output into say 3 colums or 4? A point in the right directions would be helpful thanks. <?php $entries = $pages->find('template=blog-entry')->sort('-created'); $publish_date = date('Y-m-d', $page->created); foreach($entries as $entry) { $content .= "<a href='{$entry->url}'> <h2>{$entry->title}</h2><h4>{$publish_date}</h4></a>"; $content .= shortText($entry->body,100); $content .= "<br><a href='{$entry->url}'> Read More </a>"; } function shortText($text, $maxlength = 100) { // truncate/shorten to max length $text = substr(strip_tags($text), 0, $maxlength); // check if we've truncated to a spot that needs further truncation if(strlen(rtrim($text, ' .!?,;')) == $maxlength) { // truncate to last word $text = substr($text, 0, strrpos($text, ' ')); } return trim($text); }
×
×
  • Create New...