Tuesday, June 19 2007 on other
After reading a whole bunch of sites that claim to know whats best to have on a web page, I decided I needed an "About" page, but I couldn't seem to find one in CS2007 that was for the site. Adding this page looks pretty easy, but it was the first time I was touching the siteurls_override.config file and documentation on that file is pretty sparse. First I created the about.aspx file. That was easy.
The Siteurls_override.config file overrides the siteurls.config file (in case you didn't already figure that out. What I wanted was an extra url in the location section with the name common. The reason I wanted to modify that section is that the about.aspx page is in the common folder. So the xpath I use says to look in the SiteUrls element for a locations element which has a location element with a name of common. When you find that, add the following lines. I can't say I really understand the path or pattern or vanity or physical path or well, anything on that line but I do know how to copy and paste. So what you see below is what I copied and modified.
<Override xpath="/SiteUrls/locations/location[@name='common']" mode="add"> <url name="mainabout" path="about.aspx" pattern="about.aspx" physicalPath="##themeDir##" vanity="{2}" page="about.aspx" /> </Override>
With that there, I could navigate to technovangelist.com/about.aspx. Thats half of the problem solved. I also needed an About item to show up in the top menu. Since I wanted the About item to show up after photos, but before the Control Panel which shows up if you login as me, I updated the navigation/link item with the name gallery. But I actually just updated it with a copy of itself unmodified. The next line down is a new line which gets inserted before the line that originally appeared after Gallery.
<Override xpath="/SiteUrls/navigation/link[@name='gallery']" mode="update"> <link name="gallery" resourceUrl="galleryhome" resourceName="photos" roles="Everyone" applicationType = "Gallery" /> <link name="about" resourceUrl="mainabout" resourceName="mainabout" /> </Override>
As you may have noticed, there are two fields in the link name=about line. One is for resourceUrl which is set to the url I defined in the first code block above. The resourceName refers to a line I added in the Languages/en-US/Resources.xml file. I added it to Main Navigation area, but I am not sure that it really matters.
<resource name="mainabout">About</resource>
And thats it. Now I have the About menu item you see at the top of this page, and the About link goes to a page that describes me and this site.