[Cartoweb-users] embedding Cartoweb project into web page
Alexandre Saunier
alexandre.saunier at camptocamp.com
Wed May 10 09:02:00 EDT 2006
An alternate solution is to paste the PHP code of htdocs/client.php in
your existing web page and reinject the output of $cartoclient->main();
instead of printing it. You may have to adapt your cartoclient.tpl to
remove some useless HTML code.
For instance:
<?php
@include_once('client_debug.php');
define('CARTOWEB_HOME', realpath(dirname(__FILE__) . '/..') . '/');
require_once(CARTOWEB_HOME . 'common/Common.php');
Common::preInitializeCartoweb(array('client' => true, 'apd' => true));
require_once(CARTOWEB_HOME . 'client/Cartoclient.php');
$cartoclient = new Cartoclient();
$cw_output = $cartoclient->main();
?>
<!-- some HTML/PHP of your existing web page -->
<?php someProcessingOfYourOwn($cw_output); ?>
<!-- some more HTML/PHP of your existing web page -->
oliver wrote:
> Hi Kenton,
> the quickest way (not necessarily the best) is to use an iframe.
>
> exemple there: http://www.lausanne.ch/plan
>
> we still have the project to make a Joomla module someday (though
> probably sooner than later as there are more and more request for that)
> but nothing as been done at the moment.
>
> if you want to truely merge cartoweb withing an existing
> application/cms/whatever, it is not so easy as Cartoweb was not really
> designed for this initially. I know this was done recently for a project
> but the developper is currently in vacation. I suppose they modified the
> FormRenderer.php with the main smarty templates callsm, though this will
> need confirmation.
>
> Regards,
> Oliver
>
>
>> Hello,
>>
>> I was wondering what the best method is to embed my Cartoweb project
>> into an existing web page. I have designed the existing web page with
>> the right amount of space for my Cartoweb project, but I just wanted
>> to know what methods others have been
>> successful with. Any advice would be greatly appreciated. Thanks!
>>
>> Kenton W.
>>
>> _______________________________________________
>> Cartoweb-users mailing list
>> Cartoweb-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
More information about the Cartoweb-users
mailing list