You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jordi Deu-Pons <jo...@jordeu.net> on 2011/09/01 12:30:45 UTC

How to control the href rewrite in link tag

Hi,

 I want to control the href rewrite behaviour of the links in the head section.

Now from this:
<link href="css/some.css" type="text/css" rel="stylesheet" ></link>

Wicket rewrites to this:
<link href="../css/some.css" type="text/css" rel="stylesheet"></link>

I would like to rewrite to do something like this:
<link href="../mytheme/css/some.css" type="text/css" rel="stylesheet"></link>

Is this possible?

Thanks!

--
a10! i fins aviat.
J:-Deu

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to control the href rewrite in link tag

Posted by Jordi Deu-Pons <jo...@jordeu.net>.
Ok,

 thanks Martin.

On Thu, Sep 1, 2011 at 1:01 PM, Martin Grigorov <mg...@apache.org> wrote:
> Wicket has a special IMarkupFilter implementation that does that:
> org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler
> It is not possible to extend it or replace it but you can add your own
> one that will modify the urls even more.
> You'll have to set your own
> org.apache.wicket.settings.IMarkupSettings.setMarkupParserFactory(IMarkupParserFactory)
> which you look like the default but will append your filter to the
> created MarkupParser additionaly
>
> On Thu, Sep 1, 2011 at 12:30 PM, Jordi Deu-Pons <jo...@jordeu.net> wrote:
>> Hi,
>>
>>  I want to control the href rewrite behaviour of the links in the head section.
>>
>> Now from this:
>> <link href="css/some.css" type="text/css" rel="stylesheet" ></link>
>>
>> Wicket rewrites to this:
>> <link href="../css/some.css" type="text/css" rel="stylesheet"></link>
>>
>> I would like to rewrite to do something like this:
>> <link href="../mytheme/css/some.css" type="text/css" rel="stylesheet"></link>
>>
>> Is this possible?
>>
>> Thanks!
>>
>> --
>> a10! i fins aviat.
>> J:-Deu
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
a10! i fins aviat.
J:-Deu

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to control the href rewrite in link tag

Posted by Martin Grigorov <mg...@apache.org>.
Wicket has a special IMarkupFilter implementation that does that:
org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler
It is not possible to extend it or replace it but you can add your own
one that will modify the urls even more.
You'll have to set your own
org.apache.wicket.settings.IMarkupSettings.setMarkupParserFactory(IMarkupParserFactory)
which you look like the default but will append your filter to the
created MarkupParser additionaly

On Thu, Sep 1, 2011 at 12:30 PM, Jordi Deu-Pons <jo...@jordeu.net> wrote:
> Hi,
>
>  I want to control the href rewrite behaviour of the links in the head section.
>
> Now from this:
> <link href="css/some.css" type="text/css" rel="stylesheet" ></link>
>
> Wicket rewrites to this:
> <link href="../css/some.css" type="text/css" rel="stylesheet"></link>
>
> I would like to rewrite to do something like this:
> <link href="../mytheme/css/some.css" type="text/css" rel="stylesheet"></link>
>
> Is this possible?
>
> Thanks!
>
> --
> a10! i fins aviat.
> J:-Deu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org