PHP Make Insert Page chops off the HTML, HEAD, and BODY tags, and preserves the content of the BODY tag. When you check the Preserve HEAD checkbox, it also saves anything that was in the HEAD (it just puts it alongside the contents of the BODY. Because the opening body tag is removed, any unload event handler that was specified there is completely removed, though. Some of the Softpress Actions rely on that event handler to fire the various JavaScript functions that they write, and this breaks them. That’s why I said that you need to test that.
Now as far as getting the fragments into your page, you have two options. If the page that will be including it is using PHP, then you can use a PHP include or require statement to bring the external page into that page. The syntax is:
<?php include('path/to/fragment.html'); ?>
The fragment page can be PHP or HTML, no difference.
If you need to use JavaScript to include the fragment (say if your outer page is HTML), then you would use the Protaculous Action to do that. Note the ID of the HTML box you want to put the fragment into, then write something like this in the top Function Body editor:
new Ajax.Updater('id_of_the_div', 'path/to/fragment.html', {method: 'get'});
In this case, the fragment must be HTML.
Walter
On Jun 21, 2012, at 11:06 PM, TeamSDA wrote:
Hi All,
It has been some time since we were on this topic and here I am again coming back to it. Our need has broadened since the first time of this request. In short our need is to be able to set something up on a page that may incorporate actions using javascript styling in the head and so on. We want to be able to repurpose it through a PHP include in other areas of a site.
I believe I am understanding everything walt is explaining except for the slurping of the content into another page. How do we go about bringing either a page size fragment or a snippet into another page?
I have used Tim’s action, super cool, super simple, but it only seems to bring over what is in the html box and anything that gets put outside that box is lost, i.e. javascript, freeway styles and such.
Regards,
Dave
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options