Blog Home 
Scott Yokiel MOSS 2007 & .NET blog (and some bad spelling)

RSS 2.0 Atom 1.0 CDF  
 
Sign In
 
 Tuesday, September 16, 2008

In Master Page Replace everything in <asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server"> with

      <ASP:TreeView ID="CurrentNav" runat="server" datasourceID="SiteMapDS"
        AccessKey="3" CssClass="leftNav" ExpandDepth="1"
        SkipLinkText="<%$Resources:cms,masterpages_skiplinktext%>">
      </ASP:TreeView>
      <PublishingNavigation:PortalSiteMapDataSource ID="SiteMapDS" Runat="server"
       SiteMapProvider="CurrentNavSiteMapProviderNoEncode" EnableViewState="true"
       StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false"
       TrimNonCurrentTypes="Heading"/>

We striped out some of the item level tags and chaged from a sharepoint:aspMenu to a ASP:Treeview.  Then we need to tweak the web.config. Add 'RequireUniqueKeysForNodes="true"' to CurrentNavSiteMapProviderNoEncode to make it look like this.

<add name="CurrentNavSiteMapProviderNoEncode"
   description="CMS provider for Current navigation, no encoding of output"
   type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral,PublicKeyToken=71e9bce111e9429c"
   NavigationType="Current" EncodeOutput="false" RequireUniqueKeysForNodes="true" />

 

reset ISS and roll

9/16/2008 10:41:47 AM (Central Standard Time, UTC-06:00)  #    Comments [0]    |  Trackback
 Thursday, September 11, 2008

I found this great post and man is it helping me do some simple formating of sharepoint lists.  CHeck it out i have also attached a word doc with the content in case it ever disappears.

http://pathtosharepoint.wordpress.com/2008/09/01/using-calculated-columns-to-write-html/

my favorite ="<DIV><IMG src='/_layouts/images/KPIDefault-"&(IF([Days Till Due]>7,0,IF([Days Till Due]>2,1,2)))&".gif' /></DIV>" with days till due a calc column =[Due Date]-Today

CalcColumnFormating.docx (98.92 KB)

TextToHtml.js (1.26 KB)

9/11/2008 4:09:02 PM (Central Standard Time, UTC-06:00)  #    Comments [0]    |  Trackback
 Wednesday, September 10, 2008

(from http://office.microsoft.com/en-us/sharepointtechnology/HA101215881033.aspx)

Formulas overview

Formulas are equations that perform calculations on values in a list or library. A formula starts with an equal sign (=). For example, the following formula multiplies 2 by 3 and then adds 5 to the result.

=5+2*3

You can use a formula in a calculated column and to calculate default values for a column. A formula can contain functions (function: A prewritten formula that takes a value or values, performs an operation, and returns a value or values. Use functions to simplify and shorten formulas on a worksheet, especially those that perform lengthy or complex calculations.), column references, operators (operator: A sign or symbol that specifies the type of calculation to perform within an expression. There are mathematical, comparison, logical, and reference operators.), and constants (constant: A value that is not calculated and, therefore, does not change. For example, the number 210, and the text "Quarterly Earnings" are constants. An expression, or a value resulting from an expression, is not a constant.), as in the following example.

=PI()*[Result]^2

Element Description
Function The PI() function returns the value of pi: 3.141592654.
Reference (or column name) [Result] represents the value in the Result column for the current row.
Constant Numbers or text values entered directly into a formula, such as 2.
Operator The * (asterisk) operator multiplies, and the ^ (caret) operator raises a number to a power.

A formula might use one or more of the elements from the previous table. Here are some examples of formulas (in order of complexity).

Simple formulas (such as =128+345)

The following formulas contain constants and operators.

Example Description
=128+345 Adds 128 and 345
=5^2 Squares 5

Formulas that contain column references (such as =[Revenue] >[Cost])

The following formulas refer to other columns in the same list or library.

Example Description
=[Revenue] Uses the value in the Revenue column.
=[Revenue]*10/100 10% of the value in the Revenue column.
=[Revenue] > [Cost] Returns Yes if the value in the Revenue column is greater than the value in the Cost column.

Formulas that call functions (such as =AVERAGE(1, 2, 3, 4, 5))

The following formulas call built-in functions.

Example Description
=AVERAGE(1, 2, 3, 4, 5) Returns the average of a set of values.
=MAX([Q1], [Q2], [Q3], [Q4]) Returns the largest value in a set of values.
=IF([Cost]>[Revenue], "Not OK", "OK") Returns Not OK if cost is greater than revenue. Else, returns OK.
=DAY("15-Apr-2008") Returns the day part of a date. This formula returns the number 15.

Formulas with nested functions (such as =SUM(IF([A]>[B], [A]-[B], 10), [C]))

The following formulas specify one or more functions as function arguments.

Example Description
=SUM(IF([A]>[B], [A]-[B], 10), [C]) The IF function returns the difference between the values in columns A and B, or 10.

The SUM function adds the return value of the IF function and the value in column C.

=DEGREES(PI()) The PI function returns the number 3.141592654.

The DEGREES function converts a value specified in radians to degrees. This formula returns the value 180.

=ISNUMBER(FIND("BD",[Column1])) The FIND function searches for the string BD in Column1 and returns the starting position of the string. It returns an error value if the string is not found.

The ISNUMBER function returns Yes if the FIND function returned a numeric value. Else, it returns No.

 

 

Other Great links

http://office.microsoft.com/en-us/sharepointtechnology/CH100650061033.aspx

http://office.microsoft.com/en-us/sharepointtechnology/HA101054791033.aspx

9/10/2008 10:22:25 AM (Central Standard Time, UTC-06:00)  #    Comments [0]    |  Trackback
 Wednesday, September 03, 2008

So you want to use the Today function in a calculated list column.  Well here's a way to trick sharepoint into letting you use it, when it says it won't allow it.  First create a string cloumn named Today and save the list.  Now create a calculated column named GetDate and but Today as the calculated field.  Now we delete the today column and ta-da the GetDate column will always have todays date in it.  We do this so we don't have to keep adding the temp Today field every time we edit the list item with a calc field using the today function.  Now this is different from creating a data field and setting the date to current date, this date will stay set after it have been filled out.

9/3/2008 9:28:01 AM (Central Standard Time, UTC-06:00)  #    Comments [0]    |  Trackback
 Thursday, August 21, 2008

So you want to get rid of your left nav in moss.  Well the first way to do this would be to create a webpart page with no nav.

1)View all site content
2)Create
3)Web part page

This one will have no nav so you should be looking good.

Now say this page still doens't work for you, but you don't want to have to work in designer of customize any HTML.  A little trick is to hide some css styles in a content editor web part. Paste this snippit into a it and to-da your left nav will be hidden away

<style>
.ms-quicklaunch
{
display:none;
}
.ms-navframe
{
display: none;
}
.leftNav
{
display: none;
}
.leftNavSpacer
{
display: none;
}
.mainContainer
{
width: 100%
}
</style>

8/21/2008 2:19:14 PM (Central Standard Time, UTC-06:00)  #    Comments [0]    |  Trackback
Copyright © 2008 RBA Consulting.