Hello!
I have created a sidebar snippet, that is embeded on my "blog.php" page.
"blog.php" page contains a list of the articles from the blog.
The articles template clonable pages are in another page called "article.php".
So in my "blog.php" page, I use the following to display them :
Everything works great for that part.
For the sidebar with the categories (folders) available for the articles, I've create a "blog-sidebar.php" file, containing the following code :
It does display a list of all the categories, wich is perfect, and also the number of articles that has the same category with k_folder_totalpagecount...but when I click on a category, it sends me to the blank "article.php" page template.
I need the "blog.php" page (the one that lists the articles), to change its content to display the articles linked with the category you have clicked on.
Like most blog works.
What am I doing wrong?
Thanks!
I have created a sidebar snippet, that is embeded on my "blog.php" page.
"blog.php" page contains a list of the articles from the blog.
The articles template clonable pages are in another page called "article.php".
So in my "blog.php" page, I use the following to display them :
- Code: Select all
<cms:pages masterpage='article.php'
folder=k_folder_name
start_on=k_archive_date
stop_before=k_next_archive_date
paginate='1'
limit='3' >
<a href="<cms:show k_page_link />"><div class="blog-post-preview-img" style="background-size:cover;background-image:url('<cms:show blog_image />')"></div></a>
<div class="blog-post-preview">
<h2 class="h2-blog-post-title-preview"><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h2>
<div class="blog-post-preview-author">Published <cms:date k_page_date format='j/m/y'/> par <cms:show author /></div>
<p><cms:excerptHTML count='75' ignore='img'><cms:show blog_content /></cms:excerptHTML></p>
<a href="<cms:show k_page_link />" class="w-button line-button">Read more</a>
</div>
<cms:paginator />
</cms:pages >
Everything works great for that part.
For the sidebar with the categories (folders) available for the articles, I've create a "blog-sidebar.php" file, containing the following code :
- Code: Select all
<cms:folders masterpage='article.php'>
<div class="sidebar-category">
<a href="<cms:show k_folder_link />"><p class="w-clearfix sidebar-list-item"><cms:show k_folder_title /><span class="number-end-row">(<cms:show k_folder_totalpagecount />)</span>
</p></a>
</div>
</cms:folders>
It does display a list of all the categories, wich is perfect, and also the number of articles that has the same category with k_folder_totalpagecount...but when I click on a category, it sends me to the blank "article.php" page template.
I need the "blog.php" page (the one that lists the articles), to change its content to display the articles linked with the category you have clicked on.
Like most blog works.
What am I doing wrong?
Thanks!