Author Topic: how do you package a module with a layout (solved)  (Read 75 times)

sickle

  • Full Member
  • ***
  • Posts: 62
    • View Profile
how do you package a module with a layout (solved)
« on: May 16, 2020, 02:09:21 PM »
I want to include a module with a layout, but don't want to put users through the trouble of adding it to their modules folder, how do you direct the fe.load_module command to a directory relative to the layout. I tried fe.load_module("[...]/[...]"), but it didn't work, same for fe.do_nut
« Last Edit: May 20, 2020, 10:40:05 AM by sickle »

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: how do you package a module with a layout
« Reply #1 on: May 16, 2020, 02:54:58 PM »
examples

in same folder as layout
Code: [Select]
fe.do_nut("sidebar.nut");

in script folder inside of layout folder
Code: [Select]
fe.do_nut("scripts/sidebar.nut");

in module folder inside layout folder
Code: [Select]
fe.do_nut("module/sidebar.nut");

sickle

  • Full Member
  • ***
  • Posts: 62
    • View Profile
Re: how do you package a module with a layout
« Reply #2 on: May 16, 2020, 03:37:09 PM »
haha, thanks. I forgot to add .nut when I tried it that way :P