Jump to:

3393 Posts in 976 Topics by 852 members

Template Questions

SilverStripe Forums » Template Questions » combine js files in template using require?

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1095 Views
  • wainui
    Avatar
    Community Member
    56 Posts

    combine js files in template using require? Link to this post

    I currently have multiple <% require %> tags in the template and dont want to move them to page_controller...
    can I combine them in the template??

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: combine js files in template using require? Link to this post

    No I don't believe you can do that since the template parser will probably choke on the array. You can leave your require statement in the template and put the combined_files call in the Page_Controller. AFAIK it will remove the link to the standard required file and replace with the combined path automatically for you.

    1095 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.