Custom view of html block failure
Permalink
Hi, I'm new to concrete, and am having trouble creating a custom template for the HTML block. I'd like to have a custom template to include the relative path to movies and images I am hand coding into the page.
This will help me considerably when I move the site from it's test home...
When I install the custom template in the /blocks/html/templates directory I get a php error:
It looks like the include is pointing to the wrong directory similar to this bug:http://www.concrete5.org/private/bugs/error-after-creating-custom-s...
...but the solution only half fixes the problem for the html block.
Once I change:
to
The error is resolved, but when I click on a block to edit it the edit are comes up blank (existing html is missing). Any suggestions on getting the form_setup_html.php block correctly included, while still allowing editing?
Thanks!
This will help me considerably when I move the site from it's test home...
When I install the custom template in the /blocks/html/templates directory I get a php error:
Warning:include() [function.include]: Failed opening _____public_html/blocks/html/edit.php on line 6
It looks like the include is pointing to the wrong directory similar to this bug:http://www.concrete5.org/private/bugs/error-after-creating-custom-s...
...but the solution only half fixes the problem for the html block.
Once I change:
<?php include($this->getBlockPath() .'/form_setup_html.php'); ?>
to
<?php $this->inc('form_setup_html.php'); ?>
The error is resolved, but when I click on a block to edit it the edit are comes up blank (existing html is missing). Any suggestions on getting the form_setup_html.php block correctly included, while still allowing editing?
Thanks!
The path to form_setup_html.php is unnecessary.
Use a custom template with the html block by changing edit .php from:
to:
So obvious and simple it pains me...