Hi @Cristi,
In terms of being able to dynamically generate modules from the listing page, there isn’t really a great solution. David Hunt wrote the repeater module, but even that has flaws, one of the main ones being it doesn’t number you modules.
What I’ve found is helpful is using a flex area of a template, then creating the reviews in a custom module. Take a look at this page, for example. When we built this listing page, we needed it to be simple to create a new module. This is done using the flexible column module, the template mainly looks like this:
Flexible columns allow you to creat a container that you can fill up on your page-level editor. So you would set this module, then create a custom module with all of your information for a review.
for example (explanational purposes):
<div class="review-box">
<h3>John Doe</h3>
<h4>Movie Title</h4>
<p>This is John Doe's review...</p>
<span="rating">★★★☆☆</span>
</div>
Then you’d have a module for each one of those sections.
Now that you have the custom module, you create the page and you can drag multiple versions of this module into the flex column, like so (page editor view).
When you click on one of your modules, you’ll be able to edit the custom fields within them as well.
----------------
It’s not the perfect solution, but it’s one of the better ones I’ve come up with trying to solve this problem. Some pros and cons I’ve run into:
Pros:
- You can do a ton of interesting stuff with some custom scripting, for example of the page I showed you, I’m able to paginate it from client side (which allows me to search all the modules, but only load the visible ones).
- You don’t need to know any code to add a new review
- You don’t need to create tons of modules in the template editor
- Relatively light weight.
Cons:
- You’ll need some scripting magic to attach a class to the actual parent container of each one
- All modules have the same name, making clicking through them on the edit page a little annoying.
- Modules load first, then take on their css, so you will come across a FOUC error every so often.
Hope this helps you out! (sorry for the large screenshots!)
-- Ty