Page 1 of 1

Calling a content block in a news Summary

Posted: Thu Jul 26, 2012 4:35 pm
by joecannes
Hi all,

I am wondering if this is possible and how it is done, my logic might be wrong.

Let's say for example, I have a custom content block in my template written as below:

Code: Select all

  {content block="archivedYearValue" assign="archivedYearValue"  label="Archived Year Value (YYYY)" oneline="1" wysiwyg="0"} 
and in my WYSIWYG editor, I am calling a news summary template:

Code: Select all

{news summarytemplate="NewsArchivesSummary"}
how do I call the value from "archivedYearValue" from my news summary template? This is my news summary template below:

Code: Select all

<h1>HEADER</h1>

{foreach from=$items item=entry}

{assign var="post_year_set_by_user" value=$entry->$archivedYearValue}

{if $post_year == post_year_set_by_user}
<div class="NewsSummaryLink">
	{$entry->titlelink}
</div>
{/if}
  {/foreach}
I am sure my logic is wrong, just trying to figure it out, any help would be great!

Thanks,

JC

Re: Calling a content block in a news Summary

Posted: Thu Jul 26, 2012 5:29 pm
by Dr.CSS
You most likely will have to explain this in more detail as to what it is you are trying to do...