Forum

Thread tagged as: Question, Problem, Blog

Can you display additional fields (not the standard template variables) in the s...

I have successfully set up a blog with my post_in_list.html template displaying 6 posts each containing a video, a title, an excerpt and a date. All of these link through correctly to the post.html template which displays all of this and a few extras.

For my search_result.html page I'd like the results to display in the exact same format/layout as the post_in_list.html page. At the moment the title and the url are displaying but nothing else.

I've looked through countless forum posts and read through documentation over and over but can't get my head around this.

I've put in <perch:show all /> and the excerpt id field currently has an empty value so I'm guessing thats why it's not displaying but my question is why?

Secondly any additional fields I created for the post_in_list.html / post.html templates are not displaying either and I'm starting to question if this is even possible? I'm under the impression I need to change the post_in_list.html code to function properly in the search_result.html page but I'm confused as to how?

Below is my code for the post_in_list.html template...


<perch:before>     <ul class="hfeed listing"> </perch:before> <!-- li stating 2 alternate columns --> <li <perch:every nth-child="odd"> class="f-all e-all d1-d3 c1-c3 b3-b7 a3-a7 hentry"</perch:every> <perch:every nth-child="even"> class="f-all e-all d4-d6 c4-c6 b8-b12 a8-a12 hentry"</perch:every>> <!-- Video --> <div class="video_upload"> <video width="320" height="240" poster="<perch:blog id="videoPosterImage" type="image" label="Video Poster Image"/>" controls> <source src="<perch:blog id="videoMPFour" type="file" label="Video MPFour" />" type="video/mp4"> <source src="<perch:blog id="videoOgg" type="file" label="Video Ogg" />" type="video/ogg">    Your browser does not support the video tag. </video> </div> <!-- /Video --> <!-- div odd/even prefixes for title/excerpt/date --> <div <perch:every nth-child="odd"> class="f-all e-all d-all c2-c3 b5-b7 a5-a7"</perch:every> <perch:every nth-child="even"> class="f-all e-all d-all c5-c6 b10-b12 a10-a12"</perch:every>>          <!-- div odd/even prefixes for title/excerpt --> <div <perch:every nth-child="odd"> class="f1-f2 e1-e2 d1-d2 c2 b5-b6 a5"</perch:every> <perch:every nth-child="even"> class="f1-f2 e1-e2 d4-d5 c5 b10-b11 a10"</perch:every>>                      <!-- Post Title --> <h1 class="underline_header"> <a href="<perch:blog id="postURL" />" rel="bookmark" class="entry-title"><perch:blog id="postTitle" label="Website Name" type="text" /></a> </h1> <!-- / Post Title --> <!-- Post Excerpt --> <p><perch:blog id="excerpt" type="text" label="Studio/Creator Name" order="2" /></p> <!-- / Post Excerpt --> </div> <!-- div odd/even prefixes for date --> <div <perch:every nth-child="odd"> class="f3 e3 d3 c3 b7 a7 alignRight"</perch:every> <perch:every nth-child="even"> class="f3 e3 d6 c6 b12 a12 alignRight"</perch:every>>                   <!-- Post Date --> <h1 class="entry-published date"> <perch:blog id="postDateTime" format="%d" /> — <perch:blog id="postDateTime" format="%m" /> </h1> <!-- / Post Date --> </div> </div> </li> <perch:after> </ul> <!-- Next/Prev Pagination -->     <section class="f-all e-all d-all c-all b-all a-all">         <perch:if exists="paging">             <div class="f3 e3 d6 c6 b12 a12 paging alignRight">             <perch:if exists="not_first_page">                 <a href="<perch:blog id="prev_url" encode="false" />"> < </a>             </perch:if>             <perch:if exists="not_last_page">                 <a href="<perch:blog id="next_url" encode="false" />"> > </a>             </perch:if>             </div>         </perch:if> <!-- / Next/Prev Pagination --> </section> </perch:after>

Any help or guidance with this would be greatly appreciated.

David Springate

David Springate 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is this the same issue as your existing thread, or a new issue?

Technically yes, but after further research in the forum and docs and a change in thought pattern I wanted to ask a different question..

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is your install up to date with the most recent Blog and Perch?