| Author |
Message |
|
| Guest |
Posted: Thu Aug 16, 2007 6:48 am |
|
|
|
Guest
|
Does erlyweb have an internal redirect? A result that can be returned
from the controller to tell erlyweb that it should go elsewhere. There's
ewr, but that sends a redirect to the browser. There's ewc in it's many
forms but after calling the other component the processing flow (seems)
to return and continue passing the results to the view module.
Jeff.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Thu Aug 16, 2007 6:49 am |
|
|
|
Guest
|
There's {replace, Ewc}. It's a new tuple from 0.6. It's documented in the docs.
BR,
Yariv
On 8/15/07, jm <jeffm@ghostgun.com> wrote:
>
> Does erlyweb have an internal redirect? A result that can be returned
> from the controller to tell erlyweb that it should go elsewhere. There's
> ewr, but that sends a redirect to the browser. There's ewc in it's many
> forms but after calling the other component the processing flow (seems)
> to return and continue passing the results to the view module.
>
>
> Jeff.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Thu Aug 16, 2007 7:01 am |
|
|
|
Guest
|
Yariv Sadan wrote:
> There's {replace, Ewc}. It's a new tuple from 0.6. It's documented in the docs.
>
> BR,
> Yariv
Must be looking in the wrong place then ( I was reading the examples in
your blog). That works.
Thanks,
Jeff.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
| ketralnis |
Posted: Thu Aug 16, 2007 3:28 pm |
|
|
|
User
Joined: 20 Jul 2007
Posts: 151
Location: San Francisco, CA
|
> There's {replace, Ewc}. It's a new tuple from 0.6. It's documented
> in the docs.
What does that end up sending to yaws? I'd like www/index.yaws to
show the result of a controller action instead of sending a redirect
>
> BR,
> Yariv
>
> On 8/15/07, jm <jeffm@ghostgun.com> wrote:
>>
>> Does erlyweb have an internal redirect? A result that can be returned
>> from the controller to tell erlyweb that it should go elsewhere.
>> There's
>> ewr, but that sends a redirect to the browser. There's ewc in it's
>> many
>> forms but after calling the other component the processing flow
>> (seems)
>> to return and continue passing the results to the view module.
>>
>>
>> Jeff.
>>
>>>
>>
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Thu Aug 16, 2007 6:09 pm |
|
|
|
Guest
|
Try returning this from your controller function:
{response, [{page, "www/index.yaws"}]}
On 8/16/07, David King <dking@ketralnis.com> wrote:
>
> > There's {replace, Ewc}. It's a new tuple from 0.6. It's documented
> > in the docs.
>
> What does that end up sending to yaws? I'd like www/index.yaws to
> show the result of a controller action instead of sending a redirect
>
> >
> > BR,
> > Yariv
> >
> > On 8/15/07, jm <jeffm@ghostgun.com> wrote:
> >>
> >> Does erlyweb have an internal redirect? A result that can be returned
> >> from the controller to tell erlyweb that it should go elsewhere.
> >> There's
> >> ewr, but that sends a redirect to the browser. There's ewc in it's
> >> many
> >> forms but after calling the other component the processing flow
> >> (seems)
> >> to return and continue passing the results to the view module.
> >>
> >>
> >> Jeff.
> >>
> >>>
> >>
> >
> >
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
| ketralnis |
Posted: Thu Aug 16, 2007 8:54 pm |
|
|
|
User
Joined: 20 Jul 2007
Posts: 151
Location: San Francisco, CA
|
> Try returning this from your controller function:
> {response, [{page, "www/index.yaws"}]}
Hmm, I think you might be misunderstanding (I think you have it
backwards). I want http://myserver/ to return the contents of http://
myserver/controller/action. Using www/index.html with a <meta>
refresh can redirect there, but not actually serve up those contents.
But using www/index.yaws will allow me to put up some code in there
to do so. Right now www/index.yaws has this:
<erl>
out(_Arg) ->
{redirect_local,"/post/list"}.
</erl>
That's pretty close, but instead of redirecting (which can confuse
search engines), I'd like it to just return the result as if the user
had gone to /post/list. To do that, I probably actually need to get
Yaws to do that, which I'm still learning
> On 8/16/07, David King <dking@ketralnis.com> wrote:
>>
>>> There's {replace, Ewc}. It's a new tuple from 0.6. It's documented
>>> in the docs.
>>
>> What does that end up sending to yaws? I'd like www/index.yaws to
>> show the result of a controller action instead of sending a redirect
>>
>>>
>>> BR,
>>> Yariv
>>>
>>> On 8/15/07, jm <jeffm@ghostgun.com> wrote:
>>>>
>>>> Does erlyweb have an internal redirect? A result that can be
>>>> returned
>>>> from the controller to tell erlyweb that it should go elsewhere.
>>>> There's
>>>> ewr, but that sends a redirect to the browser. There's ewc in it's
>>>> many
>>>> forms but after calling the other component the processing flow
>>>> (seems)
>>>> to return and continue passing the results to the view module.
>>>>
>>>>
>>>> Jeff.
>>>>
>>>>>
>>>>
>>>
>>>
>>
>>>
>>
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Fri Aug 17, 2007 4:55 am |
|
|
|
Guest
|
Sorry for the misunderstanding. This is how you do it: in the top of
hook/1, write the following
A1 = case yaws_arg:appmoddata(A) of
"/" ->
yaws_arg:appmoddata(A, "/controller/action");
_ ->
A
end
Then use A1 instead of A in the rest of the function. This works
because ErlyWeb looks at the appmoddata field to figure out which
controller function to call.
Yariv
On 8/16/07, David King <dking@ketralnis.com> wrote:
>
> > Try returning this from your controller function:
> > {response, [{page, "www/index.yaws"}]}
>
> Hmm, I think you might be misunderstanding (I think you have it
> backwards). I want http://myserver/ to return the contents of http://
> myserver/controller/action. Using www/index.html with a <meta>
> refresh can redirect there, but not actually serve up those contents.
> But using www/index.yaws will allow me to put up some code in there
> to do so. Right now www/index.yaws has this:
>
> <erl>
> out(_Arg) ->
> {redirect_local,"/post/list"}.
> </erl>
>
> That's pretty close, but instead of redirecting (which can confuse
> search engines), I'd like it to just return the result as if the user
> had gone to /post/list. To do that, I probably actually need to get
> Yaws to do that, which I'm still learning
>
>
> > On 8/16/07, David King <dking@ketralnis.com> wrote:
> >>
> >>> There's {replace, Ewc}. It's a new tuple from 0.6. It's documented
> >>> in the docs.
> >>
> >> What does that end up sending to yaws? I'd like www/index.yaws to
> >> show the result of a controller action instead of sending a redirect
> >>
> >>>
> >>> BR,
> >>> Yariv
> >>>
> >>> On 8/15/07, jm <jeffm@ghostgun.com> wrote:
> >>>>
> >>>> Does erlyweb have an internal redirect? A result that can be
> >>>> returned
> >>>> from the controller to tell erlyweb that it should go elsewhere.
> >>>> There's
> >>>> ewr, but that sends a redirect to the browser. There's ewc in it's
> >>>> many
> >>>> forms but after calling the other component the processing flow
> >>>> (seems)
> >>>> to return and continue passing the results to the view module.
> >>>>
> >>>>
> >>>> Jeff.
> >>>>
> >>>>>
> >>>>
> >>>
> >>>
> >>
> >>>
> >>
> >
> >
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
| ketralnis |
Posted: Sun Aug 19, 2007 2:08 am |
|
|
|
User
Joined: 20 Jul 2007
Posts: 151
Location: San Francisco, CA
|
> Sorry for the misunderstanding. This is how you do it: in the top of
> hook/1, write the following
No worries, and thanks for the information!
>
> A1 = case yaws_arg:appmoddata(A) of
> "/" ->
> yaws_arg:appmoddata(A, "/controller/action");
> _ ->
> A
> end
>
> Then use A1 instead of A in the rest of the function. This works
> because ErlyWeb looks at the appmoddata field to figure out which
> controller function to call.
>
> Yariv
>
> On 8/16/07, David King <dking@ketralnis.com> wrote:
>>
>>> Try returning this from your controller function:
>>> {response, [{page, "www/index.yaws"}]}
>>
>> Hmm, I think you might be misunderstanding (I think you have it
>> backwards). I want http://myserver/ to return the contents of http://
>> myserver/controller/action. Using www/index.html with a <meta>
>> refresh can redirect there, but not actually serve up those contents.
>> But using www/index.yaws will allow me to put up some code in there
>> to do so. Right now www/index.yaws has this:
>>
>> <erl>
>> out(_Arg) ->
>> {redirect_local,"/post/list"}.
>> </erl>
>>
>> That's pretty close, but instead of redirecting (which can confuse
>> search engines), I'd like it to just return the result as if the user
>> had gone to /post/list. To do that, I probably actually need to get
>> Yaws to do that, which I'm still learning
>>
>>
>>> On 8/16/07, David King <dking@ketralnis.com> wrote:
>>>>
>>>>> There's {replace, Ewc}. It's a new tuple from 0.6. It's documented
>>>>> in the docs.
>>>>
>>>> What does that end up sending to yaws? I'd like www/index.yaws to
>>>> show the result of a controller action instead of sending a
>>>> redirect
>>>>
>>>>>
>>>>> BR,
>>>>> Yariv
>>>>>
>>>>> On 8/15/07, jm <jeffm@ghostgun.com> wrote:
>>>>>>
>>>>>> Does erlyweb have an internal redirect? A result that can be
>>>>>> returned
>>>>>> from the controller to tell erlyweb that it should go elsewhere.
>>>>>> There's
>>>>>> ewr, but that sends a redirect to the browser. There's ewc in
>>>>>> it's
>>>>>> many
>>>>>> forms but after calling the other component the processing flow
>>>>>> (seems)
>>>>>> to return and continue passing the results to the view module.
>>>>>>
>>>>>>
>>>>>> Jeff.
>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>>
>>>>
>>>
>>>
>>
>>>
>>
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|