[Fwd: Re: [Cartoweb-users] How to remover backslashes to the url
alexandre.saunier at camptocamp.com
Mon Apr 3 03:41:37 EDT 2006
I forward this message to the list since some of you might be interested.
-------- Original message --------
Thanks for your reply, I really appreciate your help.
I was trying to create URL link directly from template and always got a
"/" appended at the end of the base url, which I described in my last
email. I also tried to generate url string from php code and had the
After I referred the information you provided, I created the link from
inside the php code too, but I include the whole HTML string into
$row->url, for example, inside php code, I did:
$url = sprintf('<a href="%s%d" target="_blank">%s</a>',
$row->url = $url;
And then I retrieve $row->url from inside the template, then it works.
What I did are within two files:
Hope this would be helpful to others too.
Again, thank you very much and have a nice day,
On 3/31/06, *Alexandre Saunier* < alexandre.saunier at camptocamp.com
<mailto:alexandre.saunier at camptocamp.com>> wrote:
is your link base URL provided through the template or using some PHP
code? Is it the base URL of your CartoWeb?
Note that in most cases, you may conveniently use the CartoWeb
"tableRules" feature to modify the content of your query results,
including for generating HTML links.
TableRules are explained in the manual:
An example is implemented within the test_main project => have a
the testMainTableRules plugin:
Xiaoyun Tang wrote:
> I made some changes to tables.tpl such that I am able to add
> the query result table. But the template automatically adds a
> "/" to the url which make it impossible to link out to other
> For example, I have a query result table and I want to link to
> services, say http://myservices.org, by using the Id attribute,
> " http://myservices.org?parameter=Id". But when I check the url
> from the query result table, I found out a backslash is
> added to the url by the template, so the call becomes
> "http://myservices.org/?parameter=Id", please note the backslash "/"
> after "org".
> Can anyone help me out, please?
> Xiaoyun Tang
More information about the Cartoweb-users