Page 1 of 1

content_dump availability

Posted: Fri Oct 03, 2014 4:53 pm
by sumpson
Is the plugin content_dump not available anymore?

The wiki at http://wiki.cmsmadesimple.org/index.php ... ntent_dump is not available.

I'm using CMSMS 1.11.11 and have been trying different versions of content_dump, now trying 0.8.4

a simple:

Code: Select all

{content_dump}
{foreach from=$dump item=dump}
{$dump->content->data}
{/foreach}
shows the error:

Code: Select all

Syntax error in template "tpl_body:24"  on line 17 "{foreach from=$dump item=dump}" item variable 'dump' may not be the same variable as at 'from'
when I use:

Code: Select all

{content_dump}
{foreach from=$dump item="dump"}
{$dump->content->data}
{/foreach}
it's blank


content_dump is essential to get the website working right, is there a way I can get it to work or is there an alternative I can use?


Thanks for any help in advance.

Re: content_dump availability

Posted: Fri Oct 03, 2014 5:34 pm
by velden

Code: Select all

Syntax error in template "tpl_body:24"  on line 17 "{foreach from=$dump item=dump}" item variable 'dump' may not be the same variable as at 'from'
This error seems pretty obvious to me; Smarty cannot create a variable with the name 'dump' while it is processing a variable with the name 'dump'.

Try something like:

Code: Select all

{foreach from=$dump item='dumpitem'}
BTW: I don't know about the module itself.

Re: content_dump availability

Posted: Fri Oct 03, 2014 6:34 pm
by sumpson
velden wrote:

Code: Select all

Syntax error in template "tpl_body:24"  on line 17 "{foreach from=$dump item=dump}" item variable 'dump' may not be the same variable as at 'from'
This error seems pretty obvious to me; Smarty cannot create a variable with the name 'dump' while it is processing a variable with the name 'dump'.

Try something like:

Code: Select all

{foreach from=$dump item='dumpitem'}
BTW: I don't know about the module itself.
thanks for your help, i've been trying item='dumpitem' but it does not work either.

Re: content_dump availability

Posted: Fri Oct 03, 2014 6:54 pm
by Jo Morg
Are you talking about this http://dev.cmsmadesimple.org/projects/contentdump?
Personally I never used it, but you might want to try to contact the developer about it. There has been a recent release, but it seems to be beta, and not ready for production sites.

Re: content_dump availability

Posted: Sat Oct 04, 2014 10:30 am
by sumpson
Jo Morg wrote:Are you talking about this http://dev.cmsmadesimple.org/projects/contentdump?
Personally I never used it, but you might want to try to contact the developer about it. There has been a recent release, but it seems to be beta, and not ready for production sites.
Yes that's the plugin i'm talking about. Is there any other way I can re-use entered data on other pages?

Re: content_dump availability

Posted: Sat Oct 04, 2014 10:41 am
by Jo Morg
You can use CGSimpleSmarty. Check module's help file particularly the bit about get_page_content

Re: content_dump availability

Posted: Sat Oct 04, 2014 12:48 pm
by sumpson
Thanks,

after a long struggle I got my data the way i want. Need information from child object and child of child object

Code: Select all

{cgsimple::get_children('',0,'children')}
			{if count($children)}
			   {foreach from=$children item='child'}
			      {if $child.show_in_menu}
			      	<h2>{$child.title}</h2>
			      	{cgsimple::get_page_content({$child.id},'','bcontent')}{eval var=$bcontent}
			        {cgsimple::get_page_content({$child.id},'catimg','foo')}{eval var=$foo}<br/>
			        
			        {cgsimple::has_children({$child.alias},'has_children')}
			        
			        {cgsimple::get_children({$child.alias},0,'childrens')}
			        {if $has_children}
			       
			        	{foreach from=$childrens item='child'}
			        		{$child.title}
			        		{cgsimple::get_page_content({$child.id},'prodimg','contentb')}{eval var=$contentb}<br/>
			        	{/foreach}
			        {/if}
			      {/if}
			   {/foreach}
			{/if}