From ff4f08b32af7c4d169810d6c5148da62c7a05e53 Mon Sep 17 00:00:00 2001 From: Sascha Karnatz Date: Thu, 3 Oct 2024 10:53:41 +0200 Subject: [PATCH] Add view partial examples to README Add an example of the search page layout and searchresults element to make it easier to actually see a result without having to copy view partials from the dummy app of the project. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index e89819e..86864de 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,16 @@ place additional elements (maybe a header image or additional text blocks) on th and then use the view helpers to render the search form on the page layout partial and the search results on the element view partial. +```erb + +<%= render_elements %> + + +<%= element_view_for(searchresults) do |el| -%> + <%= render_search_results %> +<%- end -%> +``` + ### View Helpers This gem provides some helper methods that let you render the form and the search results.