Jump to content


Photo

Module auto add scripts styles

solved

  • Please log in to reply
3 replies to this topic

#1 Soma

Soma

    Hero Member

  • Moderators
  • 3,191 posts
  • 1745

  • LocationSH, Switzerland

Posted 08 May 2012 - 01:22 PM

Shouldn't a module add a .css or .js named same as the module automaticly?

It strikes me again, that I added a ModuleName.css to the module folder assuming it get's added automaticly, but it does not. Not first time I struggle with something that should be simple. :)

Edit: The module is autoload and is extends WireData implements Module. (of course in the admin, not frontend. In case anyone wondering)

@somartist | modules created | support me, flattr my work flattr.com


#2 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,526 posts
  • 854

  • LocationVihti, Finland

Posted 08 May 2012 - 01:46 PM

If I remember correctly, process modules do that, but not others.

#3 ryan

ryan

    Hero Member

  • Administrators
  • 5,773 posts
  • 3118

  • LocationAtlanta, GA

Posted 09 May 2012 - 11:42 AM

Modules that extend Process, Inputfield or ModuleJS automatically add any .css or .js files of the same name in the same directory as the .module file.

#4 Soma

Soma

    Hero Member

  • Moderators
  • 3,191 posts
  • 1745

  • LocationSH, Switzerland

Posted 12 May 2012 - 02:03 PM

Ahh... Thanks for hints guys! :)

@somartist | modules created | support me, flattr my work flattr.com






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users