Re: [Catalyst] uri_for problem

2008-03-05 Thread Richard Thomas



Moritz Onken wrote:

[%- ourl = Catalyst.uri_for('/search') _ "?stype=seqid&query=" -%] ?

Am 05.03.2008 um 10:50 schrieb Emmanuel Quevillon:

Thanks! That did the work.


Well, it might work, but it does seem a messy way to do it.

 [%- ourl = Catalyst.uri_for('/search', { stype => seqid, query  
=> '' }) -%]


-or (and this is a lot easier to work with in many circumstances,  
especially if you're conditionally manipulating the parameters)


 [%- params = { stype => seqid, query => ''} -%]
 ...
 [%- ourl = Catalyst.uri_for('/search', params) -%]

Hope that helps,

RET

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] uri_for problem

2008-03-05 Thread Emmanuel Quevillon

Moritz Onken wrote:

[%- ourl = Catalyst.uri_for('/search') _ "?stype=seqid&query=" -%] ?



Am 05.03.2008 um 10:50 schrieb Emmanuel Quevillon:


Thanks! That did the work.
-
Emmanuel Quevillon
Biological Software and Databases Group
Institut Pasteur
+33 1 44 38 95 98
tuco at_ pasteur dot fr
-

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] uri_for problem

2008-03-05 Thread Thomas Klausner
Hi!

On Wed, Mar 05, 2008 at 10:50:07AM +0100, Emmanuel Quevillon wrote:

> I am trying to build some url from TT using uri_for sub but I encounter 
> some problem with it.
>
> When in my tt I have :
> [%- ourl = Catalyst.uri_for('/search?stype=seqid&query=') -%]
>
> when I click on it, I get an url that looks like :
> search%5C%3Fstype=seqid&query=
>
> Is there a way to get the proper url produce in the HTML page without 
> '%5C%3F' ?

The docs say:
  $c->uri_for( $path, @args?, \%query_values? )

translated to TT that should read
  [%  Catalyst.uri_for('search', { stype=>'seqid' } ) %]
(I think, but I constantly mix up how to defines hashes in TT)


-- 
#!/usr/bin/perl  http://domm.plix.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] uri_for problem

2008-03-05 Thread Moritz Onken

[%- ourl = Catalyst.uri_for('/search') _ "?stype=seqid&query=" -%] ?



Am 05.03.2008 um 10:50 schrieb Emmanuel Quevillon:


Hi,

I am trying to build some url from TT using uri_for sub but I  
encounter some problem with it.


When in my tt I have :
[%- ourl = Catalyst.uri_for('/search?stype=seqid&query=') -%]

when I click on it, I get an url that looks like :
search%5C%3Fstype=seqid&query=

Is there a way to get the proper url produce in the HTML page  
without '%5C%3F' ?
I tried quoting and double quoting the url and escaping the question  
mark but without success.


Thanks a lot.
--
-
Emmanuel Quevillon
Biological Software and Databases Group
Institut Pasteur
+33 1 44 38 95 98
tuco at_ pasteur dot fr
-

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/



___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] uri_for problem

2008-03-05 Thread Emmanuel Quevillon

Hi,

I am trying to build some url from TT using uri_for sub but 
I encounter some problem with it.


When in my tt I have :
[%- ourl = Catalyst.uri_for('/search?stype=seqid&query=') -%]

when I click on it, I get an url that looks like :
search%5C%3Fstype=seqid&query=

Is there a way to get the proper url produce in the HTML 
page without '%5C%3F' ?
I tried quoting and double quoting the url and escaping the 
question mark but without success.


Thanks a lot.
--
-
Emmanuel Quevillon
Biological Software and Databases Group
Institut Pasteur
+33 1 44 38 95 98
tuco at_ pasteur dot fr
-

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/