You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Felix Gonschorek <fe...@netzgut.net> on 2013/11/01 02:41:17 UTC

Re: [T5.4] Removing Bootstrap from pages individually

Hi,

if you have to to exclude the bootstrap.css but still want to include the
tree.css, tapestry.css, exception-frame.css and tapestry-console.css i
found an easy solutation that i wanted to share:

// fixing default bootstrap include
@Contribute(JavaScriptStack.class)
@Core
public static void
setupCoreJavaScriptStack(OrderedConfiguration<StackExtension>
configuration) {
 configuration.override("bootstrap.css", null);
}

this deactivates the bootstrap.css in the core stack.

i just simply love how i can do microsurgical intervention with tapestry
ioc :-)






On Wed, Oct 9, 2013 at 10:45 AM, Felix Gonschorek <fe...@netzgut.net> wrote:

> Hi,
>
> you can disable the auto-include of the core stack when you add this to
> your AppModule:
>
> public void
> contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter>
> configuration) {
>  configuration.override("ImportCoreStack", null);
> }
>
>
> then you can add the core stack individually as needed with
> @Import(stack="core")
>
> The only component from tapestry-core that includes the core stack is the
> Alerts component - see my jira issue:
> https://issues.apache.org/jira/browse/TAP5-2190
> As long as you don't use the Alerts component you can remove bootstrap
> completely this way if you want to.
>
> I am using Bootstrap happily in the backend but not in the frontend of our
> web applications.
>
> Cheers
> Felix
>
>
>
>
> On Wed, Oct 9, 2013 at 4:07 AM, Thiago H de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
>
>> On Tue, 08 Oct 2013 23:05:42 -0300, Thiago H de Paula Figueiredo <
>> thiagohp@gmail.com> wrote:
>>
>>  On Tue, 08 Oct 2013 22:21:12 -0300, Barry Books <tr...@gmail.com>
>>> wrote:
>>>
>>>  I was not a big fan of auto including the core stuff.
>>>>
>>>
>>> Me neither. I think it can be easily disabled by overriding the
>>> "ImportCoreStack" MarkupWriterListener contribution to the MarkupRender
>>> service to a dummy implementation.
>>>
>>
>> Or an implementation that only adds the core stack based on some given
>> logic, of course.
>>
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>