Here is the function I call:

  1. public function LatestNews() {
  2. $holder = BlogPost::get()->limit(3)->sort('PublishDate', 'DESC');
  3. return ($holder);
  4. }

Morning folks. I have a template block that displays a summary of blog posts, I can get all the info I need apart from the category title...

  1. <% loop $LatestNews %>
  2. <% if $FromEnd(0) != 0 %>
  3. <a href="$Link">
  4. <div class="col-sm-12 col-md-4 recent-news--item">
  5. <h6>$Categories.Title</h6>
  6. <span class="recent-news--item--date">$PublishDate.Format('dd.MM.YY')</span>
  7. $FeaturedImage
  8. <p class="recent-news--item--summary">$Title.LimitCharacters(60,'...')</p>
  9. </div>
  10. </a>
  11. <% end_if %>
  12. <% end_loop %>

In some dedicated page… But could be a controller as well

function SearchForm() { $form = parent::SearchForm(); $form->setFormAction(Director::baseURL().“searchresults/SearchForm”); return $form; }

If you set up your search form to use get instead of post as its method then you should get URL parameters

Not sure if i'll get a quick response, but just curious if there's a way I can either point a search result to go to it's own results url instead of staying on the current page type. Or maybe a variable i can see in a template that tells me when i'm on the page with search results so i can hide stuff

yes, the lessons are really great for getting started but I find its too big of a leap to be able to understand the api pages to find all the possibilities. a little collection of “ideas” or something like that (not full tutorials just examples of the various options with screenshots of how they turn out) would be really nice