Now, we have in the cmsms core the tag: page_attr
Use example:
Code: Select all
{page_attr key="extra1"}
Code: Select all
{page_attr key="extra1"}
Code: Select all
{if $count > 0}
{foreach from=$nodelist item=node}
{get_content_props content_id=$node->id assign_as_array=content_props}
{foreach from=$content_props item=page}
ID: {$page.content_id}<br />
ALIAS : {$page.content_alias}<br />
{foreach from=$page item = prop}
{* enter required property name here. for ex.:
{if $prop.prop_name == 'extra1'}
... do something ...
{/if}
{if $prop.prop_name == 'custompropertyname'}
... do something ...
{/if}
*}
{$prop.prop_name}: {$prop.data}<br />
{/foreach}
{/foreach}
{/foreach}
{/if}
Code: Select all
{menu template="yourtemplatename.tpl" start_element="1.3.1" show_root_siblings="1"}
Code: Select all
{cms_module module="Album" albums="{get_content_props props='extra1'}"}
Code: Select all
{get_content_props props="extra1" assign="extra1"}
{cms_module module='album' albums="$extra1"}
Code: Select all
{get_content_props assign=content_props}
{cms_module module='album' albums="$content_props.$page_alias.extra1.data"}
Code: Select all
{page_attr key="extra1" assign="myParam"}
Code: Select all
{$myParam}
Code: Select all
{if $myParam eq "yes"}
...do something...
{/if}
Code: Select all
{$content_obj->mProperties->mPropertyValues.extra1}
{$content_obj->mProperties->mPropertyValues.extra2}
{$content_obj->mProperties->mPropertyValues.extra3}
And this is exactly whatPythoniels wrote:
I only need to show the extra paga attribute 1,2,3 and nothing more.
Code: Select all
{$content_obj->mProperties->mPropertyValues.extra1}
{$content_obj->mProperties->mPropertyValues.extra2}
{$content_obj->mProperties->mPropertyValues.extra3}
Code: Select all
{page_attr key="extra1" assign="myParam"}
{$myParam}
So what you actually need might be just a bit smarty logic, isn't it?Pythoniels wrote:
it's not a big problem to just show those extra page attributes, i need a script that works with a echo. Because if the EPA is in use, it has to show something in a table. If it's not in use, it doesn't need to be show.
Can anybody help me???
Code: Select all
{if $content_obj->mProperties->mPropertyValues.extra1 != ''}
Do something here
{/if}
Yes, that's exactly what I'm looking for. The thing where it's all about is on the bottom of the pages. It's all about the 'fotos' section.NaN wrote:So what you actually need might be just a bit smarty logic, isn't it?
Maybe something like this?
So "Do something here" only happens if there is actually some value within the extra 1 attribute.Code: Select all
{if $content_obj->mProperties->mPropertyValues.extra1 != ''} Do something here {/if}
Is that what you're looking for?
So why don't you check if it actually is empty?Pythoniels wrote:
I need something that IF extra 1 is empty, the text in red doesn't appear.
But if that field is not empty, it does need to show this because it looks much better.