I am trying to create a custom module to manage a slider.
After install my current-development module, I have:
- a slider content-type
a slider view defined to show Content (Full Content) of the content-type slider with Unformatted list formata node--slider template that renders the slider node as a li element
EDIT: Code updated You can check the module code here: https://github.com/jmvelasco/drupal
I wonder how could I add a wrapper that contains all nodes of this content-type and call to render each node using the template defined.
The idea I have in mind is define a block like:
<div id="wrapper" class="slider">
<ul>
render_node_slider($slider_content)
</ul>
</div>
So the end rendering will be somethink like:
<div id="wrapper" class="slider">
<ul>
<li> slider content 1 </li>
<li> slider content 2 </li>
...
<li> slider content N </li>
</ul>
</div>
But I don't know how to manage this even if I am pretty sure this is completely possible to achieve.
The accepted answer points to the right direction, from the current state of development, now I'd like to know if I can improve the slider_block_view
https://github.com/jmvelasco/drupal/blob/master/slider.module (line 101-124)
using a templete file defined in the module instead code the html inside a function module. I want also to attach a css and js files when rendering this view.
I'll appreciate any kind of help here.
Thanks for the reading.