-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS missing with {% do paginate() %} #42
Comments
@ulab : I have the same problem, when using a collection and a pagination in a modular page (seems that the way modular pages are designed, doesn't allow events to point to the instant they are processed). As a workaround, just add, in your base.html.twig, the asset (you can condition it to a route, as I did) :
I've assigned it to a group, for more control, but that's totally optional. |
I forgot one thing : you have to declare a Just take care of not using a Here's the way the plugin works (I discovered that after 2 hours of debugging) :
So, here how I adapted my code to solve that conflict :
|
As a workaround I have just added the pagination's CSS directly in the twig template where I am using it, but I still think it is a bug.
Mine seems to work without setting
|
@ulab Depends how you added it. Just doing a :
isn't enough. Because this instruction has to be processed during the page's HTML
and in your base.html.twig :
|
It works fine by just adding it to the template. The keyword is "defferred assets" which have been around since last major release I think.
|
Ok, fine. I knew about the deferred thing, but didn't know that adding a {{ assets.css() }} anywhere would work if using the deferred keyword. Thx. |
When doing pagination using the Twig function
paginate()
, the plugin's CSS is not being added as an asset.This is probably, because onPageInitialized() checks if the page header has
header.content.pagination
set - which the page doesn't since I am doing it in the twig template.The text was updated successfully, but these errors were encountered: