Forum
Blog Section
Hi all ,
I was trying to implement a section . The below is the plan on mind .
The latest updated blog will have a template , while the old ones have a different but same template . PFA the document of screentshot for the layout .
I am able to recreate the layout in html , but how do i make the blog template look different for the latest one ?
for eg : https://www.uber.com/en-IN/blog/
Thanks in advance
You can switch inside the template:
Thanks a lot !
Hi ,
Im not sure if i can raise a query thats related to the above here , but posting it anyways .
PFA the template of my code as below
when i use the function called perch_blog_recent_posts(15); i need it to output the result in such a manner that the first three comes in a row , then net three in another row etc.
Is this possible with perch ?
In your template that is used by
perch_blog_recent_posts()
, you can useperch:every
, as per:https://docs.grabaperch.com/templates/conditionals/every/
but as you can see , the row class has to be repeated at a count of every 3 columns . Since it is a parent element , how do i do it >?
The above is my template code . How do i make it in such a way that every 4th element needs to be inside a new row ?
Somewhere towards the end of your element code, insert
<perch:every count="3"></div><div class="row"></perch:every>
That will finish the current row and start a new one.You might end up with a blank row in certain situations (where the last row number is divisible by 3), but you'll have to see how that affects you.
Try it and see how it works out.
<perch:blog id="postDateTime" is there a way to change the template of this ?
Kindly ignore the above question .