[erlang-questions] CB render a param to the url
Ivan Carmenates García
co7eb@REDACTED
Wed Jun 4 14:48:08 CEST 2014
Hi David and all,
I would like to know if there is a way in CB to pass a parameter to a page
url and values to the template at the same time using a redirect or
render_other, for example in my case:
I have a simple page with a control tab and in the url I specify as a
parameter witch tab will be showed when the page loads, ex:
//localhost/session?tab=login
Then if some errors occurs while entering the login information I have to
redirect from the controller who is dealing with the POST login request to
the //localhost/session again but passing ?tab=login to open the
corresponded tab, ex: //localhost/session?tab=login but at the same time I
have to pass values to the django template.
I tried this, but it didnt work!
{render_other, [{controller, "index"},
{action, "session?tab=login"}],
[{errors, Errors}]}.
And this:
{render_other, [{controller, "index"},
{action, "session"},
{tab, "login"}], %% or {params, [{tab, "login"}]} and
many of its variants
[{errors, Errors}]}.
I also tried to do something like this in the boss routes file
{"/signup", [{controller, "index"}, {action, "session"}, {tab, "login"}]}.
So I could simplify the render other
{render_other, [{controller, "index"},
{action, "signup"}],
[{errors, Errors}]}.
Best regards,
Ivan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140604/19bef7c1/attachment.htm>
More information about the erlang-questions
mailing list