[SOLVED] Is there a way to add blog style excerpts of daughter pages to a parant
Posted: Tue Dec 02, 2008 9:23 pm
Has any one written this kind of thing?
thanks!
-Richard
thanks!
-Richard
Content management as it is meant to be
https://forum.cmsmadesimple.org/
Code: Select all
{content_dump start_id=$content_id}
{foreach from=$dump item=dump}
<div class="blog_entry">
<h2>{$dump->content->title}</h2>
<span class="date">{$dump->created->date}</span>
<p>{$dump->content->data}</p>
</div>
{/foreach}
Concerning the alias and the actual page URL, you have to manually build it (like you finally did):The Alias command gives me what I place in the Alias field. What command can i use to get the actual page url? do I need to use alias and add the page url manually in each page options section?
Code: Select all
<a href="{$dump->content->alias}.htm">click here</a>
or
<a href="index.php?page={$dump->content->alias}">click here</a>
or
<a href="index.php?page={$dump->content->id">click here</a>
Code: Select all
{foreach from=$dump item=dump }
<div class="blog_entry">
<h2>{$dump->content->title}</h2>
<span class="date">{$dump->created->date}</span>
<p>{cms_selflink page=$dump->content->alias text="See: {$dump->content->title}"}</p>
</div>
{/foreach}
Code: Select all
<a href="{$dump->content->alias}.htm" title="USA Explained: {$dump->content->title}">See: {$dump->content->title}</a>
$content_id is used in the parameter start_id so that the plug-in only looks in the branch beginning with the current page. I never tried $content_id+1... a very interesting idea... however, when the next ID is not a daughter page, you'll index the wrong branch. Just exclude the starting page with the exclude parameter so you plug-in call looks like this:This displays what I ask but it also displays the parent page. is there a way to get it to start at the first daughter page? if I add "+1" to the $content_id i get the next page but it will stop there and not give me the rest of the daughter pages.
Code: Select all
{content_dump start_id=$content_id exclude="$content_id"}
Code: Select all
{content block="page_summary" wysiwyg=false}
Code: Select all
{content block="page_summary" wysiwyg=false assign=page_summary_var}
Code: Select all
{content_dump block_name="page_summary" start_id=$content_id}
{foreach from=$dump item=dump }
<div class="blog_entry">
<h3>{$dump->content->title}</h3>
<span class="date">{$dump->created->date}</span>
<p>{$dump->content->data}<br />
{cms_selflink page=$dump->content->alias text="See: {$dump->content->title}"}
</p>
</div>
{/foreach}