|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
Re: Custom CSS File - Compact CSS file.Hi Benny and List,
I've attached a simple extra stylesheet that compacts things in the vertical dimension. See attached. Use instructions are in the file. I also was not able to get the clean extensions version going of using a custom stylesheet... I tried tracing it - but failed. :) So i followed Benny's advice and just copied the application.rhtml file from Radiant into my extension and hardcode modified it to include my extension. I realize this is fragile - If i upgrade to a new radiant version I will need to check if application.rhtml has changed and recopy it into my extension. cheers, topher On Dec 20, 2007 10:22 AM, Benny Degezelle <benny@...> wrote: > Don't know about you Christopher, but i still haven't got this working.. > As a quick fix, you can just make an /app/views/layouts/application.rhtml > file in your extension, and add the extra stylesheet from there > > Benny > > Oh, duh! Sorry I overlooked this problem. > > > > You need to memoize the @stylesheets array. Change that method to look > > like this: > > > > def customize_admin_css > > @stylesheets ||=[] > > include_stylesheet 'radiant_custom' > > end > > > > Sean > > > > Christopher Zimmermann wrote: > > > Hi, > > > Im trying to include a custom CSS file for radiant. Previously, I just > > > replaced the main.css file in the radiant gem directory - but thats > not > > > "sustainable". > > > > > > I tried following Sean's instructions below but have run into trouble. > > The > > > technique is to create an extension that runs a before filter that > > calls: > > > include_stylesheet 'my_stylesheet' > > > > > > But it looks like the include_stylesheet is crashing because the > > @stylesheet > > > array is empty. > > > > > > The line it is failing on is: > > > controllers/application.rb line 22 > > > "@stylesheets << sheet" > > > > > > My extension looks like this: > > > > > > def activate > > > require_dependency 'application' > > > SiteController.class_eval do > > > > > > prepend_before_filter :customize_admin_css > > > > > > def customize_admin_css > > > include_stylesheet ('radiant_custom') > > > end > > > end > > > end > > > > > > Any ideas anyone - could be something silly as I am still a rubynuby. > > > > > > Thanks! > > > Topher > > > > _______________________________________________ > Radiant mailing list > Post: Radiant@... > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant > -- Christopher Zimmermann topher@... 604-484-9279 _______________________________________________ Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
| Free embeddable forum powered by Nabble | Forum Help |