how to use Blocks created by Admin?
there is a block named showcase in Admin->site->blocks :
{$project = fuel_model('projects', array('find' = 'one', 'where' = array('featured' = 'yes'), 'order' = 'RAND()'))}
{if ($project) }
{$project->name}
image_path}" />
{/if}
how can i use this block for example in a view file?
trying to use :
<?=fuel_block("showcase")?>
but "Nothing Happens"
please help me.
Comments
Does it work if you create a view file in views/_blocks/showcase.php?
but when trying to load a dynamic block it doesn't work.
<?=fuel_block("showcase")?> if there is static contents shows but when i trying to load content from database by fuel_model there is nothing displayed.
i have tested codes individually and its correct when loading on a standalone view file then copy and paste it to a block and there is nothing displayed no error ..
//----------works fine on view
$domains= fuel_model('domains', array('find' => 'all'));
foreach ($domains as $list){?>
<?=$list->name?>
<?php } ?>
//---------------------------------------------SOLVED ...
{$domains= fuel_model('domains', array('find' = 'all'))}
{foreach $domains as list :}
{$list->name}
{/foreach}
i had syntax issues
FUEL is a nice CMS but poor in documentation and examples.
// thank you very much