Recommendation:

Add to info file:
stylesheets[all][] = "feedback_simple.css"

Remove from hook_init()

Comments

seandunaway’s picture

Title: Declare css file in .info rather than hook_init() » Declare css file with #attached rather than hook_init
Assigned: Unassigned » seandunaway
Status: Active » Needs review
StatusFileSize
new837 bytes

Whoops, you're right! I guess I missed this in the port from d6. I applied it with #attached on the render array instead. Please let me know if this works for you. :)

seandunaway’s picture

StatusFileSize
new837 bytes

It was a mistake to change to footer from page_bottom region. Also it makes sense to use build versus alter. Updated patch attached.

mstef’s picture

Status: Needs review » Reviewed & tested by the community

That works too -- good call.

Nice job on the module.

seandunaway’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

commit d5293eb36feb04e74993d5ab06d1e82d175c3f9d
Author: rump
Date: Thu Mar 29 22:09:41 2012 -0700

Issue #1508480 by rump, mikestefff: Declare css file with #attached rather than hook_init. Thanks mikestefff!

feedback_simple.module | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.