Jump to content

buster808

Starter
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About buster808

  • Rank
    Jr. Member
  1. Hi, I have uikit3 slider which I have used as a text slider but can't get the auto height to work dependant on the size of the content. Anyone fixed this before or used an auto height slider that works with Proccesswire repeater fields. Thanks
  2. 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.
  3. 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>"; }
  4. got this working foreach ($page->images as $image) { $content .= "<div uk-lightbox>"; $content .= " <a href='{$image->url}'><img src='{$image->url}'/></a>"; $content .= "</div>"; }
  5. 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}'/>"; }
  6. 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>"; ?>
  7. 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
  8. 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>
  9. 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...