So you’ve tried the fancy Audience Targeting (AT) feature in MOSS. You probably realized it’s just this || close to useless unless you want to use that “AMAZING” content query web part. What if you want your custom view to be filtered for the user’s audience? This solution doesn’t cover all scenarios but it goes far.
What is needed:
SPD, your view needs to be converted to XSLT, and you need an audience.
What are we trying to do:
you have a doc lib with AT turned on, and you have individual docs with audiences specified. you want to show the right audience the right docs.
but you realize that this isn’t working.
What you need to do:
Create a page with two views to your doc lib.
Convert them to XSLT.
Build a basic filter in the first one (Title contains “something”) use “contains”
The Data Query is created in the XSL, where you can edit it.
In the first view: (showing just the docs for the target audience)
In the code, search for: Name="Title"
Replace the word Title with Target_x0020_Audiences
In the code search for: Type="Text">something<
replace the word something with the exact name of your Target Audience (don’t replace the spaces with _x0200_)
right click the first view in SPD and go to web part properties > advanced
specify the audience that should see only the docs targeted at it
This view will be shown to that audience only
In the second view: (showing all docs)
right click it in SPD and go to web part properties > advanced
specify the audience that should see everything
This view will be shown to that audience only
Done
Save, browse and enjoy the hack!
In this installment we look at how to access a Sharepoint list and get at a field of that list. I’m not gonna look at the security aspect of this scenario, but suffice it to say that you’ll probably need to adjust the permissions of your traget list in order for SmartPart to gain access.
Read More »
This is a continuation on my SmartPart web part development. In this installment I go over what I do with the Design phase to make it more controllable.
A problem that you run into with developing with SmartPart is that what you actually develop is a User Contro, which in VS 2003 is not all that advanced in terms of visual form design. THe problems I ran into were related to precise placements of buttons and text boxes, making things appear or disappear. To make things easier I do this:
The container panel (the first one) can be made to appear and disappear and you can have multiple panels each one representing a different “mode” kind of like a seperate form. You can also use this to create multiple toolbars that would appear depending on who’s logged into the SharePoint site. The Grid layout Panel from the HTML section of the toolbox is what allows me to place things as I please. This is not a very precise representation of what your page will looklike so make sure you build and deploy for a final review.
I just ran into an issue with my SmartPart 1.0.0.0 deployment. I have a new SharePoint virtual server and I noticed that the SmartPart and SmartPartList web parts were not available on it.
OK, that’s fair since during initial install of smart part it adds it self to specific or all virtual servers and since this virtual server is installed after the smart part it may not be added to it. So, I tried running the smartpart install again. No worky. It exits with an error saying check the log file, which I did and it’s blank.
So I decided to add it manually. This is how I did that.
NOTE: You need smartPart already installed on the server. This is not a manual install procedure, this is a way to manually add smartpart to a new virtaul server.
1. Create this folder in your virtual server’s folder. wpcatalog
2. Copy the smartPart files from another virtual server, you’ll find them in that virtaul server’s wpcatalog folder. These files will be named like these:
SmartPart_1.0.0.0__dd0656hh12b5277a_SmartPart.dwp, SmartPart_1.0.0.0__dd0656hh12b5277a_SmartPartList.dwp
3. Open the web.config file of the virtual server that works and find and copy this:
4. Open the web.config file of the virtual server that doesn’t work and paste this file in relatively the same location.
And that’s it, now it works for me.
http://www.downloadsquad.com/2006/12/29/script-aculo-us-how-to-easily-ajax-your-site/
http://templora.com/content/14