addSyle: inside updateRoot not being able to set URL

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

addSyle: inside updateRoot not being able to set URL

StormByte
Hi all,

I implemented updateUrl, updateRoot and initialRequest so I can take
care of the URLs in my project. Specifically, as I am working with
rewrites, I hide my "app name" configured in seaside.

As an example, a "normal" link would be:
mydomain.com/my_app_name/?_s=XX&_k=YY. By implementing updateRoot,
initialRequest, updateUrl and rewrites in nginx's config, I am
successful in completelly remove my_app_name from all links in all the
site except one place.

Inside updateRoot: I put custom CSS via aHtmlRoot addStyle: ( "My CSS
code" ), and it works, but the link is generated with "my_app_name" in
it.

Any way to handle that URL generation so I can hide it there also?

Thanks

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: addSyle: inside updateRoot not being able to set URL

Philippe Marschall
On Thu, Jul 16, 2015 at 6:28 PM, David <[hidden email]> wrote:

> Hi all,
>
> I implemented updateUrl, updateRoot and initialRequest so I can take
> care of the URLs in my project. Specifically, as I am working with
> rewrites, I hide my "app name" configured in seaside.
>
> As an example, a "normal" link would be:
> mydomain.com/my_app_name/?_s=XX&_k=YY. By implementing updateRoot,
> initialRequest, updateUrl and rewrites in nginx's config, I am
> successful in completelly remove my_app_name from all links in all the
> site except one place.

The following approaches would probably be simpler
- set the #requestHandler: on your server adaptor to you application
instead of the default dispatcher
- set #defaultName: on the default dispatcher to 'my_app_name'

This way you don't have to implement #updateRoot #initialRequest and #updateUrl

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: addSyle: inside updateRoot not being able to set URL

StormByte
El Fri, 17 Jul 2015 10:59:16 +0200
Philippe Marschall <[hidden email]> escribió:

> On Thu, Jul 16, 2015 at 6:28 PM, David <[hidden email]> wrote:
> > Hi all,
> >
> > I implemented updateUrl, updateRoot and initialRequest so I can take
> > care of the URLs in my project. Specifically, as I am working with
> > rewrites, I hide my "app name" configured in seaside.
> >
> > As an example, a "normal" link would be:
> > mydomain.com/my_app_name/?_s=XX&_k=YY. By implementing updateRoot,
> > initialRequest, updateUrl and rewrites in nginx's config, I am
> > successful in completelly remove my_app_name from all links in all
> > the site except one place.
>
> The following approaches would probably be simpler
> - set the #requestHandler: on your server adaptor to you application
> instead of the default dispatcher
> - set #defaultName: on the default dispatcher to 'my_app_name'
>
> This way you don't have to implement #updateRoot #initialRequest and
> #updateUrl
>
> Cheers
> Philippe

Thanks for your response. The implementation of the initialRequest +
updateUrl and updateRoot is not only for that, it is also to maintain a
SEO friendly links across pages.


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside