JM
Thu Nov 17 09:36:08 CST 2005
Thanks that helps. Guess I'm still unsure how WSS and Inetpub/wwwroot work
together. I don't really know where to put all the pieces. To recap:
I have a "intraheader.js" file that I reference in my Onet.xml file, and
this "intraheader.js" includes a "cmgshared/intraheader.asp" page. Where
should these files be? Should the .js file be in layouts?
Here is what I've done (but is not working):
1. Onet.xml : contains CustomJSUrl="/_layouts/IntraHeader.js"
2. ...60\TEMPLATE\LAYOUTS contains the IntraHeader.js file
3. IntraHeader.js contains: <script language="JavaScript"
src="/cmgshared/includes/IntraHeader.asp?tabStyle=intranet&tabSelected=2"></script>
4. cmgshared is located under inetpub/wwwroot and I made it a virtual
directory in IIS (not sure if I needed to).
5. My WSS excluded paths contains /cmgshared
But, when I use my new template, it doesn't pull in my header from the
intraheader.asp page. I still see it in the View Source as:
<SCRIPT language='javascript' src='/_layouts/IntraHeader.js'></SCRIPT>
Can you see what I'm still doing wrong?
Thanks so much for all your help so far,
JM
"Heather Solomon [MVP]" wrote:
> Excluded paths that I have added in the past have always resided in an
> Inetpub/wwwroot folder, not in the SharePoint 60 directories. Have you tried
> moving it to there, excluding the path and then running it?
> --
> Heather Solomon, MVP WSS
>
http://www.heathersolomon.com/blog
>
>
> "JM" wrote:
>
> > As a followup, I've been trying to figure out how/where to add this to the
> > Excluded Paths, but am confused about what to enter as the path. I can move
> > the cmgshare folder so that it is more accessible but where? It's confusing
> > how the SharePoint URL corresponds to a path on the server.
> >
> > "JM" wrote:
> >
> > > Heather,
> > > I was able to get past this point (just ended up starting over - I'm not
> > > sure what I did wrong the first time).
> > >
> > > Now, I can see my new template in the list when I create a new site. My
> > > header code isn't getting run though. I have a IntraHeader.js file on
> > > C:\Microsoft Shared\Web Server Extensions\60\TEMPLATE\LAYOUTS which has
> > > script to call my header.asp code; ie:
> > > <script language="JavaScript"
> > > src="/_layouts/cmgshared/includes/IntraHeader.asp?tabStyle=intranet&tabSelected=2"></script>
> > >
> > > When I create a new site based on this template and I do a view source, I
> > > see the javascript line, but it didn't run my IntraHeader.asp page. Is there
> > > something more I need to do to get it to run ASP from inside a SharePoint
> > > page? Maybe I need to put the "cmgshared" folder that contains the asp file
> > > and supporting files somewhere else?
> > > Thanks in advance,
> > > Joan
> > >
> > >
> > > "Heather Solomon [MVP]" wrote:
> > >
> > > > Did you restart IIS after adding the new template? Have you tried using a
> > > > different ID number in the Template element?
> > > > --
> > > > Heather Solomon, MVP WSS
> > > >
http://www.heathersolomon.com/blog
> > > >
> > > >
> > > > "JM" wrote:
> > > >
> > > > > Heather,
> > > > > Thanks very much for the info. That's just the kind of help I was hoping
> > > > > for. I'm hoping you can now help me with an error I've run into.
> > > > > I followed the instructions for "Creating a Site Definition from an Existing
> > > > > Site Definition" as a start. I copied the STS folder to "STSCMG" and added a
> > > > > "cmgshared" folder under it with images, etc. I then copied the WEBTEMP.XML
> > > > > to WEBTEMPCMG.XML, which I then changed to:
> > > > > <?xml version="1.0" encoding="utf-8" ?>
> > > > > <Templates xmlns:ows="Microsoft SharePoint">
> > > > > <Template Name="STSCMG" ID="10001">
> > > > > <Configuration ID="0" Title="SharePoint Project Notebook" Type=0
> > > > > Hidden="FALSE"
> > > > > ImageUrl="/cmgshared/images/cmg.gif"
> > > > > Description="This template creates a Project Notebook site for teams to
> > > > > create, organize, and share project information.">
> > > > > </Configuration>
> > > > > </Templates>
> > > > >
> > > > > I tried to create a new site based on this template, but when I try to
> > > > > create it I get the error ""Value does not fall within the expected range.".
> > > > > I just wanted to see if I could get this far before changing the onet.xml
> > > > > file to use the customjsurl. Do you have any ideas what might be wrong? (I
> > > > > now realize how breakable WSS is!).
> > > > > Thanks,
> > > > > JM
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "Heather Solomon [MVP]" wrote:
> > > > >
> > > > > > You can add custom JavaScript to run on the entire site, or add it to an
> > > > > > individual page.
> > > > > >
> > > > > > Whole site: specify the JavaScript file in the ONET.xml file.
> > > > > > ONET.XML file location: \TEMPLATE\1033\STS\XML
> > > > > > Element to alter: PROJECT - Add the "CustomJSUrl" attribute
> > > > > > More info:
> > > > > >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/tscamlproject_SV01028126.asp
> > > > > >
> > > > > > Individual Page: Add a Content Editor Web Part (CEWP) to the page, edit it
> > > > > > using the Source Editor and add your JavaScript there. Next set the CEWP to
> > > > > > hide under the Layout menu in the CEWP tool pane. This will hide the web
> > > > > > part from the users, but the scripts will still run when the page loads.
> > > > > > --
> > > > > > Heather Solomon, MVP WSS
> > > > > >
http://www.heathersolomon.com/blog
> > > > > >
> > > > > >
> > > > > > "JM" wrote:
> > > > > >
> > > > > > > I found the info about how/where WSS pages run (sorry for not looking more
> > > > > > > thoroughly first) from:
> > > > > > >
http://msdn.microsoft.com/msdnmag/issues/04/07/WindowsSharePointServices/default.aspx
> > > > > > >
> > > > > > > I'm still not understanding about how to add the javascript line to run an
> > > > > > > .asp page to pull in our corporate header though, so if anyone can help me
> > > > > > > with that, I'd appreciate it!
> > > > > > > TIA
> > > > > > >
> > > > > > > "JM" wrote:
> > > > > > >
> > > > > > > > Hello,
> > > > > > > >
> > > > > > > > I'm trying to quickly get a new WSS site up for our company. Our company
> > > > > > > > has numerous websites that use the same header (which is either inherited in
> > > > > > > > an asp.net app or embedded with an asp page using javascript for asp pages).
> > > > > > > > I'm trying to do the same thing on a WSS page using FrontPage (I'm new to
> > > > > > > > Frontpage, I'm used to VS.NET v2002). I tried just putting the javascript
> > > > > > > > tag at the top but this doesn't seem to do anything.
> > > > > > > > The other thing that confuses me is where the WSS pages are running from?
> > > > > > > > When I look under C:\Inetpub, I don't see a corresponding site for my pages.
> > > > > > > > And when I look in IIS I also don't find any corresponding sites.
> > > > > > > > Any help to point me in the right direction would be appreciated.
> > > > > > > > TIA.