Hi, I’m new to the forum and I wish to thank everyone for the informations I’ve read in the past months. I’ve managed to port my site completely to modx revo in a localhost, but I’m having issues with the blog setup.
I’ve followed the tutorial
http://rtfm.modx.com/display/revolution20/Creating+a+Blog+in+MODx+Revolution and I understand all the parts, but still it’s not working for me. I think there’s something wrong in my setup. I’ll try to post everything so that maybe someone can find the problem, I haven’t found any working solution for me in the forum. Sorry for the long post.
My MainTemplate:
[[$site_header]]
[[*content]]
[[$site_footer]]
my Blog page, ID 14 (using MainTemplate):
[[!getResourcesTag?
&elementClass=`modSnippet`
&element=`getResources`
&tpl=`blogPost`
&parents=`11`
&limit=`5`
&includeContent=`1`
&includeTVs=`1`
&showHidden=`0`
&hideContainers=`1`
&cache=`0`
&pageVarKey=`page`
]]
[[!+page.nav:notempty=`
<div class="paging">
<ul class="pageList">
[[!+page.nav]]
</ul>
</div>
`]]
My News category (using MainTemplate)
[[!getResourcesTag?
&element=`getResources`
&elementClass=`modSnippet`
&tpl=`blogPost`
&hideContainers=`1`
&pageVarKey=`page`
&parents=`[[*id]]`
&includeTVs=`1`
&includeContent=`1`
]]
[[!+page.nav:notempty=`
<div class="paging">
<ul class="pageList">
[[!+page.nav]]
</ul>
</div>
`]]
My blogPost chunk:
<div class="post">
<h2 class="title"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
<p class="post-info">Posted by [[+createdby:userinfo=`fullname`]]
[[+tv.tags:notempty=` | <span class="tags">Tags:
[[!tolinks? &items=`[[+tv.tags]]` &key=`tag` &target=`14`]]
</span>`]]</p>
<div class="entry">
<p>[[+introtext]]</p>
</div>
<p class="postmeta">
<span class="links">
<a href="[[~[[+id]]]]" class="readmore">Read more</a>
| <span class="date">[[+publishedon:strtotime:date=`%b %d, %Y`]]</span>
</span>
</p>
</div>
My BlogPost template, used by the Resources inside the News category:
UPDATE: I placed an extra [ here, but it was a post error. In my site the call was correct.
[[$site_header]]
<div id="content" class="blog-post">
<h2 class="title"><a href="[[~[[*id]]]]">[[*pagetitle]]</a></h2>
<p class="post-info">
Posted on [[*publishedon:strtotime:date=`%b %d, %Y`]] |
Tags: [[*tags:notempty=`[[!tolinks? &items=`[[*tags]]` &key=`tag` &target=`14`]]`]] |
</p>
<div class="entry">
<p>[[*introtext]]</p>
<hr />
[[*content]]
</div>
<div class="postmeta">
[[*tags:notempty=`
<span class="tags">Tags: [[!tolinks? &items=`[[*tags]]` &key=`tag` &target=`14`]]</span>
`]]
<br class="clear" />
</div>
<hr />
</div>
[[$site_footer]]
All the &target options point to my blog home (ID 14).
Now, whe I load the News page I get a blank page, I only read the content of the [[$site_footer]] over the blank page. In debug, I can confirm no [[$site_header]] loading, but the [[$site_footer]] is there.
By testing various parts for errors, I tried removing the
from my News page, and the page loads normally but without any content. So I think there could be some problem in the call.
I’m willing to give any informations you need in order to make it work.
Thanks in advance!