Share » Forums » Setup & design » has_content is_valid is_set

has_content is_valid is_set

has_content is_valid is_set

Tuesday 08 November 2005 4:53:26 am - 3 replies

Modified on Tuesday 08 November 2005 4:54:10 am by Heiner Wurbs

Author Message

Gurudutt Verma

Wednesday 09 November 2005 12:33:37 am

Hi!

I have tested has_content in the said template works fine here.

Where did you find is_set or is_valid is not working ?

Heiner Wurbs

Thursday 24 November 2005 9:54:45 am

Hi,
I have some problems concerning the new documentation, the deprecated template functions like section and the not documentated functions like has_content and the not working is_set and is_null :(

Here is the sample, the well known breadcrump in new template style, ok, the foreach loops works, but not the is_set and is_null:

first with is_set

{foreach $module_result.path as $index => $object}
	{if gt($index,1) }
		{if is_set( $object.url )}
			{$object.text|wash}  / 
		{else}
			<a href={$object.url|ezurl}>{$object.text|wash}</a> /
		{/if}
	{/if}
{/foreach}

and with is_null

{foreach $module_result.path as $index => $object}
	{if gt($index,1) }
		{if is_null( $object.url )}
			{$object.text|wash}  / 
		{else}
			<a href={$object.url|ezurl}>{$object.text|wash}</a> /
		{/if}
	{/if}
{/foreach}

The old template style was something like

{section name=Path loop=$module_result.path}
    {section show=$Path:item.url}
        {section show=is_set($Path:item.url_alias)}
            <a href={$Path:item.url_alias|ezurl}>{$Path:item.text|wash}</a> /
        {section-else}
            <a href={$Path:item.url|ezurl}>{$Path:item.text|wash}</a> /
        {/section}
    {section-else}
        {$Path:item.text|wash}
    {/section}
{section-else}
{/section}

Anybody knows?
Heiner

Gurudutt Verma

Friday 25 November 2005 1:00:29 am

Hi!

It seems it is not working here as well.

Could you report this as bug. so it could be tested there.

Please provide this link over there as well.

Thanks for digging code :-)

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu