Skip to content

Commit

Permalink
Merge pull request #48 from sascha-karnatz/extend-readme
Browse files Browse the repository at this point in the history
Add view partial examples to README
  • Loading branch information
tvdeyen authored Oct 3, 2024
2 parents bdf7353 + ff4f08b commit f544f7c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<!-- app/views/alchemy/page_layouts/_search.html.erb -->
<%= render_elements %>
<!-- app/views/alchemy/elements/_searchresults.html.erb -->
<%= 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.
Expand Down

0 comments on commit f544f7c

Please sign in to comment.