[Solar-talk] Embeded php files
Antti Holvikari
anttih at gmail.com
Sat Apr 5 13:20:01 CDT 2008
On Sat, Apr 5, 2008 at 8:55 PM, Sean Montague
<scene at themountainscene.com> wrote:
> Hi Antti,
>
> I'm playing with this, an I can't seem to get it to work. What I have for
> directory structure is the standard:
>
> "Vendor/App/Index.php"
> "Vendor/App/Index/Layout/_content.php"
> "Vendor/App/Index/View/index.php"
>
> Where <?php echo $this->layout_content; ?> is in my _content.php and
> "Vendor/App/Index/View/index.php" is what gets written out. In FireFox I
> <?php include $this->template('_content.php'); ?> to get what I want.
> FireFox can read svg inline, but IE. Referring to your response, I tried:
> <embed id="svg" width="100%" height="100%" src="<?php echo
> $this->action('App/Index.php') ?>" type="image/svg+xml" />,
> <embed id="svg" width="100%" height="100%" src="<?php echo
> $this->action('App/Index/View/index.php') ?>" type="image/svg+xml" /> & just
> to be sure,
> <embed id="svg" width="100%" height="100%" src="<?php echo
> $this->action('App/Index/Layout/_content.php') ?>" type="image/svg+xml" />
Add this to Vendor_App_Index:
protected $_action_format = array(
'index' => 'svg',
);
Then, create Vendor/App/Index/View/index.svg.php and output the svg there.
Finally call action helper like this in the `src` attrib of <embed>:
<?php echo $this->action('index/index.svg') ?>
> None of these worked. I even put Vendor in the path. I looked up
> Solar_App_Bookmarks on the website, but it didn't help much.
Take a look at the actual code for it. You can see exactly how it
serves the RSS format for the action.
Hope this helps.
--
Antti Holvikari <http://anttih.com>
More information about the Solar-talk
mailing list