Forum

Thread tagged as: Question, Runway, Blog

Runway Blog Setup

Hi,

Can anybody confirm if i should be using a different post_in_list template for the archive pages which uses different post links?

currently i have the below:

 <a href="blog/<perch:blog id="postSlug" />" rel="bookmark" class="btn btn-default pull-right">read more</a>

This works ok across my site apart from on the archive pages on which they get amended to include /blog/tag/

mydomain.com/blog/tag/blog/2015-04-09-my-blog-title

I checked my routes and page paths to that of the documentation but i must be missing something i guess.

blog/[blogslug:s]
blog/[year:year]
blog/[year:year]/[i:month]
blog/category/[slug:cat]
blog/tag/[slug:tag]
blog/author/[slug:author]

thanks in advance

Steve Forbes

Steve Forbes 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What code do you have in your template for the archive pages?

Im currently using the same post_in_list.html

<perch:before>
<ul class="hfeed listing"></perch:before>

    <div class="col-sm-6 col-md-6 col-lg-6">
        <div class="equal--cont">

    <article data-file="<perch:blog id="postURL" />" data-target="article">

    <li class="hentry">
        <h3><a href="blog/<perch:blog id="postSlug" />" rel="bookmark" class="entry-title"><perch:blog id="postTitle" /></a></h3>
        <perch:if exists="image"><img src="<perch:blog id="image" type="image" />" class="img-responsive" alt="<perch:blog id="postTitle" />" /></perch:if>
        <p class="entry-published date"><perch:blog id="postDateTime" format="%d %B %Y" /></p>

        <div class="description entry-summary">
        <perch:blog id="excerpt" type="textarea" textile="true" words="40" apped"..."/>
        </div>

    </article>

    </li>
            <div class="clearfix"></div>
            </div>
        <a href="blog/<perch:blog id="postSlug" />" rel="bookmark" class="btn btn-default pull-right">read more</a>

    </div>
<perch:after>
    </ul>
    <perch:if exists="paging">
        <div class="paging">
            Page <perch:blog id="current_page" /> of <perch:blog id="number_of_pages" />
            <perch:blog id="page_links" encode="false" />
            <perch:if exists="not_first_page">
                <a href="<perch:blog id="prev_url" encode="false" />">Previous</a>
            </perch:if>
            <perch:if exists="not_last_page">
                <a href="<perch:blog id="next_url" encode="false" />">Next</a>
            </perch:if>
        </div>
    </perch:if>
</perch:after>

Have you tried making the link root relative by including a forward slash at the beginning of the URL?

<a href="/blog/<perch:blog id="postSlug" />" rel="bookmark" class="btn btn-default pull-right">read more</a>
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's a good call. I think that could be the issue here.

Hey Martin,

Spot on!!

cheers guys