← Back to News & Newsletter Support
in news.htm now use: ´{% component 'news'%}´ i need use diferent template, in other plugin like Slideshow, these make me a partial in slideshow/default and inside : '{% if SELF.slideshow.slides %} {% for i, slide in SELF.slideshow.slides %}'
Replace the {% component 'news' %} tag to html content of /components/posts/default.htm. After that you can modify the design of news list.
Thanks Gergo85, but..
...try it that way, but it does not work...
my file path es \themes\amerip-idc\partials\pages-home\noticias.htm
and the content is:
{# % partial "pages-home/noticias" %# }
<div class="lt-row row">
<!-- component 'news' --------------------->
{# % component 'news'%#}
{% set posts = __SELF__.posts %}
{% for post in posts %}
TITULO: {{ post.title }}
{% if loop.first %}
{% endif %}
{% endfor %}
<!-- --------------------->
</div>
Last updated
See https://octobercms.com/docs/cms/components#overriding-partials for information on how to override the default partials provided by components. You'll end up with {% component 'news' %}
in your page where you want to render the component and your markup for rendering the component in themes/my-theme/partials/news/default.htm
LukeTowers said:
See https://octobercms.com/docs/cms/components#overriding-partials for information on how to override the default partials provided by components. You'll end up with
{% component 'news' %}
in your page where you want to render the component and your markup for rendering the component inthemes/my-theme/partials/news/default.htm
Thanks LUKE, works!!
1-7 of 7