Hi,
I have a blog template set up with a link named Wildlife. This link is a container and will contain many individual pages (each a news article). At present when you click the link it takes you to the containers page which has no content. I want to list (by title) all the children in the container on the containers page.
Therefore you would click the link and be taken to a page that lists the pagetitles of the children in the specified container. Can anyone give me an idea where to start please?
Regards
DS
www.PawsForWildlife.co.uk
www.Borntobrick.co.uk
you can use getResources or pdoResources to get the list of links
<ul>
[[!getResources?
&parents=`[[*id]]`
&tpl=`tplLinks`
]]
</ul>
the chunk tplLinks:
<li><a href="[[~[[+id]]]]">[[+pagetitle]]</a></li>
Hi Bruno thanks for the reply. I have managed to create a template to style my call that look like this:
<div class="post-[[+id]] post hentry category-latest-news tag-tag3 tag-tag5 tag-tag7" id="post-[[+id]]">
<div class="post-top">
<div class="post-date">
<span class="day">[[+publishedon:strtotime:date=`%d`]]</span>
<span class="month">[[+publishedon:strtotime:date=`%b`]]</span>
<span class="year">[[+publishedon:strtotime:date=`%Y`]]</span>
</div>
<h2><a href="[[~[[+id]]]]" rel="bookmark" title="Permanent Link to [[+pagetitle]]">[[+pagetitle]]</a></h2>
<a href="[[~[[+id]]]]" class="more-link">Read the rest of this entry »</a>
</div>
</div>
What I want to achieve is adding a box with the introtext in, or first couple of lines in the content with a 1px border. I need to clean some of the code up but for now I just want to get the main parts in place
Regards,
DS
www.PawsForWildlife.co.uk
www.Borntobrick.co.uk
never mind, a bit of playing around and now have it sussed!:
<div class="post-[[+id]] post hentry category-latest-news tag-tag3 tag-tag5 tag-tag7" id="post-[[+id]]">
<div class="post-top">
<div class="post-date">
<span class="day">[[+publishedon:strtotime:date=`%d`]]</span>
<span class="month">[[+publishedon:strtotime:date=`%b`]]</span>
<span class="year">[[+publishedon:strtotime:date=`%Y`]]</span>
</div>
<h2><a href="[[~[[+id]]]]" rel="bookmark" title="Permanent Link to [[+pagetitle]]">[[+pagetitle]]</a></h2><h4>[[+introtext]]</h4>
<a href="[[~[[+id]]]]" class="more-link">Read the rest of this entry »</a>
</div>
</div>
Regards,
DS
www.PawsForWildlife.co.uk
www.Borntobrick.co.uk