Editing Blocks from Admin
So I'm trying to figure out what the deal is with header & footer blocks.
I can edit the header and footer blocks from FTP and thats all fine.
If I create a block called header, I can import from the block file. Sweet.
If I create a block called footer, for some reason that block doesn't want to auto load.
When I deleted the header block, THEN the footer block auto loaded. Weird....
IF I make a change through the admin interface to the header, footer, or any of my pages, the changes say they save.
BUT they do not take effect.
I have to upload the file via FTP.
THEN the change still doesn't take effect.
I need to go back to the block, go to edit it, and it will say it can autoload. I load it, save it, and THEN the change takes effect.
Maybe I'm missing a setting somewhere but I don't think this is supposed to happen...
Comments
The fuel_block() function will first check the database if there are any blocks with the given name, and if not, then will check the views/_blocks/ folder for a block with the specified name. Does that make sense?
So on your recommendation I've changed views/_layouts/main.php to use fuel_block and that looks good. I can now inline edit the blocks which is sweet.
And when I upload a new view via FTP i'm asked to auto load it and then the changes go through.
I noticed a different problem earlier but now that we're past my first post we'll move on I'm xcited to get this thing going it looks freaking powerful.
SO I currently have a footer block that is editable through admin cp.
I just created one for header.
It does not auto load the views/_blocks/header.php file.
Earlier when I was starting out, I added and autoloaded the header - then made a footer and the footer didn't auto load. When I deleted the header block from the admin CP, and visited the footer block in the admin CP, *then* the footer block prompted me to autoload.
Got a quick fix for this?
BUT now when I have the header block, I get exception 'Dwoo_Security_Exception' with message 'Call to a disallowed php function : css' in application/libraries/dwoo/Dwoo/Compiler.php:2937 ; application/libraries/dwoo/Dwoo/Compiler.php(1715): Dwoo_Compiler->getPluginType('css') #1 ; fuel/application/libraries/dwoo/Dwoo/Compiler.php(1365): Dwoo_Compiler->parseFunction('
However, now:
exception 'Dwoo_Compilation_Exception' with message 'Compilation error at line 16 in "string:" : The template has been closed too early, you probably have an extra block-closing tag somewhere' in fuel/application/libraries/dwoo/Dwoo/Compiler.php:957 Stack trace: #0
fuel/application/libraries/dwoo/Dwoo/Compiler.php(813): Dwoo_Compiler->push('
I don't have any markup in my header that is foreign to the stock header file.
FWIW, line 16 in my header file is <?php /* for IE specific ?>
here is my header, less some HTML. Not a huge problem for the time being I can just not use the block until you post the fix for the syntax.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <head> <meta name="robots" content="noindex, nofollow"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="en-us" /> <TITLE><?php echo fuel_var('page_title');?></TITLE> <meta name="keywords" content="<?php echo fuel_var('meta_keywords'); ?>" /> <meta name="description" content="<?php echo fuel_var('meta_description'); ?>" /> <meta http-equiv="imagetoolbar" content="no" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <?php echo css('main'); ?> <?php /* for IE specific ?> <?php echo css('ie6', '', array('ie_conditional' => 'lte IE 6')); ?> <?php echo css('ie7', '', array('ie_conditional' => 'lte IE 7'));?> <?php */ ?> <?php echo js('jquery, main, jquery-cycle'); ?> <?php echo js($js); ?> <script type="text/javascript" charset="utf-8"> //<![CDATA[ var basePath = '<?php echo site_url();?>'; var imgPath = '<?php echo img_path(); ?>'; //]]> </script> </head>
The PHP code to template code function isn't perfect so my guess is that upon importing, some templating code may get messed up. Try removing that middle part about IE specific code.
You can use the code and pre tags to do code formatting.
Thanks very much for working with me over the last hour or so, great support!! Let's fill this forum up with info to help everyone else!