Archive for the ‘Tip’ Category

Content Type ID

Wednesday, August 15th, 2007

Another Sharepoint quick tip here.  I was recently working on putting in a custom feature, and needed to add the ‘Content Type ID’ to the xml. (sidenote: if you’re creating publishing sites as your main site template, and you need set pages created for each site, it looks like you want to create those additional pages as a feature.  This will allow for central administration of those pages, so you can easily change them down the road rather than a site by site update, since the site definition or site templates really won’t let you do this for additional “pages”.   Chris O’Brien talks about some of this, and has some nice walkthroughs on custom features.)
For the life of me I couldn’t find out where to get the Content Type ID of a custom content type I created.  Then, thankfully, I ran across this post by Andrew May talking about Content Type IDs.  Which stopped me running head first into a wall, as there isn’t much out there on this subject.

The main point I found useful on this topic was (emphasis mine):

If you want to take a look at actual content type IDs in WSS, here’s what you can do: navigate to the Content Type Gallery for a site. When you click on a content type, the URL to that content type contains a parameter, ctype, which is in fact the content type ID for that content type.

So you don’t need to do digging through the database, or write up some custom code.  Just browse to your Content Type Gallery.

Restricting Layouts

Wednesday, May 30th, 2007

In Sharepoint 2007 it is now possible to restrict layouts on a site-by-site basis.

This is really nice because it allows for you to create custom layouts for specific purposes, and then only make that layout visible where you want it. So when you have that special case, that one request that breaks your normal layout, you can create the layout and expose it in a singular instance.

Okay, to get to where you restrict your layouts, go to your site settings, modify all site settings.
pagelayouts.gif

When you click on the restrict page layouts, you’re presented with two combo-boxes.  The top section combo-boxes are to restrict your site templates for any subsites created under this site.  The bottom section is the page layouts.

layout2.gif

Now when you create a page or site, your layout options and site templates are restricted.

Easy as pie.

Saving a Publishing Site as a Template in Sharepoint 2007

Tuesday, May 29th, 2007

Okay, since I’ve been doing a LOT of MOSS 007 branding recently, I figured it was only fair enough I write about it.  I can’t find too much information online other than Heather Solomon, but yet I doubt we’re the only two people out there rebranding MOSS.  So I’ve decided that I’m going to make a real concerted effort to write up more of what I’m figuring out in my efforts to make Sharepoint 2007 operate and look like I want.

I’ve been working with MOSS for about a year now, since the first beta.  Not working on private stuff, but with clients and real requirements.  So I do have a fair amount of practical experience.

So most every site I build out seems to be a Publishing Site.  I find the Pages feature to be so incredibly worthwhile I’m puzzled whenever it isn’t available.

But of course, nothing is ever easy.  So I found when I had a Publishing Site I had created, and went to go save it as a template.  Well guess what.  That option isn’t available.  It just isn’t there.

Well I was stumped.  I needed this site to be a template, and it needed to be a Publishing Site.  And trying to create a Publishing Site via the Schema?  I was stumped.

Till I tried writing out the URL by hand.

/PATH/TO/SITE/_layouts/savetmpl.aspx

That is the magic URL.  Put that in, and you can save your Publishing Site out to a template, content included.  Seems to work pretty okay so-far.

Setting Type on the Web to a Baseline Grid

Wednesday, April 11th, 2007

From A List Apart: Setting Type on the Web to a Baseline Grid.

“We web designers get excited about the littlest things. Our friends in the print world must get a kick out of watching us talk about finally being able to achieve layouts on the web that they’ve taken for granted for years. Let’s face it: it’s easier these days to embed a video on the web than it is to set type consistently or align elements to a universal grid.”

A nice writeup to an odd problem that does plague sites.

Sharepoint Content Queries

Friday, February 2nd, 2007

Three quick tips/points. In Sharepoint 2007 the Content Query is an incredibly powerful tool. It’s a webpart that basically allows you to query your site and it returns an XML stream that you can then style the XSL for using the ItemStyle.xml.

By combining the Itemstyle.xml and Site Columns you create some real power. Maybe at some point in the future I’ll write more about what I’ve found with these two things.

But some quick notes and tips (because these lists are quicker and easier for me to write up rather than a real actual article or post, with real sentences, etc.)

  1. DO NOT USE SPACES in your Site Columns. Just avoid it. There is no reason. It causes problems when you’re extending the CommonFields property in the Exported Webpart to use with the Itemstyle. CamelCase it then you can rename the column. The source column name will stay CamelCased.
  2. Speaking of the CommonFields property in the Exported Webpart, here is the list of Field Types I use:
    1. Text
    2. Note
    3. Number
    4. Currency
    5. Integer
    6. Boolean
    7. DateTime
    8. Threading
    9. Lookup
    10. Choice
    11. URL
    12. Counter
    13. RichHTML
    14. Image
  3. In your ItemStyle.xsl, add the following as your last property. When chosen it’ll show you all the fields the part is pulling in.  (Brackets and code view taken off as it was causing weirdness with my Wordpress installation, and I’m not in the position to spend a ton of time looking at why right now.)
    xsl:for-each select=”@*”
    Property: xsl:value-of select=”name()”
    xsl:for-each

Stupid Sharepoint Trick.

Tuesday, January 23rd, 2007

I’ve gotten this request more than once with Sharepoint 2007.  It’s how to customize the Rich Text editor within the  ‘Pages’ feature.  And you have two easy ways to do it.

One way is to go into your layout file in Designer, right-click on the PublishingWebControls:RichHtmlField field you’re looking to configure.  Choose ‘Tag Properties’.  You’ll have a tool pane open with just scad’s of options for configuring your Rich Text field.  AllowFonts, AllowHeadings,AllowHTMLSourceEditing, etc.  It’s pretty self-explanatory.
Another way to go is by defining the styles available in the dropdown.  By adding some rules to the bottom of your CSS file using the .ms-rteCustom-XXXXX declaration, you can give the end users the ability to use your predefined styles. 

PNG support

Tuesday, January 2nd, 2007

The easiest way to PNG support in IE6 at blog.bjorkoy.com. It couldn’t be easier. This apparently was created by Angus Turnbull.

img { behavior: url(iepngfix.htc); }

You put a .htc file into your CSS directory, and then put that declaration into your CSS file. Pretty straightforward, and you then have PNG Alpha Transparency for IE6. Can’t be more straightforward.

Gridding the 960

Thursday, December 14th, 2006

Cameron Moll has collected a number of different articles, graphics, links and thoughts regarding designing for a grid. It’s an excellent resource.
Some highlights are:

How to redirect a web page, the smart way

Monday, August 14th, 2006

Steven Hargrove has a great article on how to redirect a web page the smart way.

The best way to redirect those pages is by using something called a “301 Redirect”.  He goes into why the 301 works, and examples of ASP, JSP and other pages.

Design Links

Monday, March 27th, 2006

A bunch of design and development links for you today. The majority (90%?) of these links came from [etc][via] the past couple of months.

* [Create really cool new windows][1] using [prototype][1a]. You can then use [script.aculo.us][1b] to have the sexy effects on the window. You _must_ try the demos.
* [24ways][2] really deserves it’s own post. It’s got [24 great tutorials/posts][2] on how to do things. Things such as:
* [Swooshy Curly Quotes without Images][2a] is great for pullout quotes.
* [Improving Form accessibility with DOM Scripting][2b].
* [An explanation of ems][2c].
* Russ Weakley shows us how to create [simple, accessible external links][3]. He uses a class in this example, but I’ve seen the same thing done using a Regex parser to loop through all the links. But that’s probably a bit much.
* [Tagcloud lets you create and manage clouds][4] with content you are interested in, and lets you publish them on your own website.

[1]: http://blogus.xilinus.com/pages/javawin
[1a]: http://prototype.conio.net/
[1b]: http://script.aculo.us/
[2]: http://www.24ways.org/
[2a]: http://24ways.org/advent/swooshy-curly-quotes-without-images
[2b]: http://24ways.org/advent/improving-form-accessibility-with-dom-scripting
[2c]: http://24ways.org/advent/an-explanation-of-ems
[3]: http://www.maxdesign.com.au/presentation/external/
[4]: http://www.tagcloud.com/
[5]: http://komodomedia.com/blog/index.php/2005/08/24/creating-a-star-rater-using-css/
[5a]: http://www.gr0w.com/articles/code/php_5_star_rating_system_using_hreview/
[6]: http://www.formarchitect.com/index.php
[7]: http://www.dragon-labs.com/articles/octopus/
[8]: http://www.skimcss.com/skimlist
[9]: http://www.smileycat.com/miaow/archives/comment-showcase.html
[10]: http://paularmstrongdesigns.com/weblog/css/navigation-magnification
[10a]: http://www.asktog.com/columns/044top10docksucks.html
[11]: http://print.wordpress.com/2006/02/22/css-beautifully-numbered-lists/
[12]: http://alltheheroesaredead.com/weblog/archives/2006/02/external-related-links-on-mt-blog
[13]: http://www.cssplay.co.uk/menus/dd_valid.html
[14]: http://www.mapsurface.com/
[15]: http://www.cssplay.co.uk/menu/one_page.html
[16]: http://pro.html.it/niftycube/
[16a]: http://www.cssplay.co.uk/boxes/snazzy.html
[16b]: http://www.spiffycorners.com/

[via]: http://www.fortysomething.ca/mt/etc/
(more…)