[Solar-talk] Embeded php files
Sean Montague
scene at themountainscene.com
Sat Apr 5 13:59:31 CDT 2008
Thanks Antti,
I got it to work, but in an ironic twist due to a law suite, in IE
activeX content needs to be activated, which the Adobe svg viewer is.
There is a way around it with external javascript such as:
document.write('<embed id="svg" width="100%" height="100%"
src="/Index/index.svg" type="image/svg+xml" />');
Which didn't work obviously. In the end, this solution is not an option.
But it is good to know this for future reference. Thanks!
Sean
Antti Holvikari wrote:
> 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.
>
>
More information about the Solar-talk
mailing list