How I can show Blog Categories, Posts, Comments, etc. on a single page (CMS or other places for example) ?



1. Enable blocks in the module settings

 

go to module settings -> Positions Blocks and select:

 

- Blog Categories in CUSTOM HOOK (blogCategoriesSPM)

 

- Blog Posts in CUSTOM HOOK (blogPostsSPM)

 

- Block Comments in CUSTOM HOOK (blogCommentsSPM)

 

- Block Blog Search in CUSTOM HOOK (blogSearchSPM)

 

- Block Blog Archives in CUSTOM HOOK (blogArchivesSPM)

 

- Block Blog Tags in CUSTOM HOOK (blogTagsSPM)

 

- Block Blog Top Authors in CUSTOM HOOK (blogTopAuthorsSPM)

 

- Block Gallery in CUSTOM HOOK (blogGallerySPM)

 

Enable blocks

 

2. Add code in your template in any place in where you want

 

1. You just need to add a line of code to the tpl file of the page where you want to add the Blog Categories:


 

{hook h='blogCategoriesSPM'}

 

2. You just need to add a line of code to the tpl file of the page where you want to add the Blog Posts:


 

- For all Blog Posts:

 

{hook h='blogPostsSPM'}

 

- For Blog Posts in the selected category (for example: id_category='2'):

 

{hook h='blogPostsSPM' id_category='2' mod='blockblog'}

 

3. You just need to add a line of code to the tpl file of the page where you want to add the Blog Comments:


 

- For all Blog Comments:

 

{hook h='blogCommentsSPM'}

 

- For Blog Comments in the selected post (for example: id_post='2'):

 

{hook h='blogCommentsSPM' id_post='2' mod=‘blockblog'}

 

4. You just need to add a line of code to the tpl file of the page where you want to add the Blog Search:


 

{hook h='blogSearchSPM'}

 

5. You just need to add a line of code to the tpl file of the page where you want to add the Blog Archives:


 

{hook h='blogArchivesSPM'}

 

6. You just need to add a line of code to the tpl file of the page where you want to add the Blog Tags:

 

{hook h='blogTagsSPM'}

 

7. You just need to add a line of code to the tpl file of the page where you want to add the Blog Top Authors:

 

{hook h='blogTopAuthorsSPM'}

 

8. You just need to add a line of code to the tpl file of the page where you want to add the Blog Gallery:

 

{hook h='blogGallerySPM'}

 



You will also find other SPM Prestashop Modules