1

I have a custom list (MOSS/SharePoint 2007), and several views (around 7). Now I would like to know if it's possible to apply a script through a CEWP for all the views, without add a webpart, select a CEWP, link my script file etc.

Repeat it for all my views (7 times) is so boring and "ugly". I want a portable and generic method, allowing me to apply this script to all my views, and once my list is templated, the script will still be "linked" to my list and all my views.

Is it possible? Or should I keep doing it manually?

5
  • Hello @Funnycuni. Nice Question, But i don't think it's possible. You are asking to embed a JavaScript in definition of a list which is not feasible. If i will get any workaround, i will update you. Jul 7, 2014 at 10:16
  • @VarunVerma, so I have to create 7 Content Editor Web Part (CEWP), for each views, and link my JavaScript file to them manually. I'm okay with it, but I'm wondering if all the CEWP will be "saved" when my list will be templated, or if I will have to re-create them in future deployment on other site?
    – Funnybear
    Jul 7, 2014 at 11:11
  • 1
    No. Nothing will get save in template :) CEWP is a control to page and not list :). yes you need to redo it Jul 7, 2014 at 11:16
  • Even if I export the CEWP and save it in the Web Part Gallerie?
    – Funnybear
    Jul 7, 2014 at 12:16
  • Then it will be ok. But again you need to add that exported webpart to each and every page :) Jul 7, 2014 at 12:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.