Microsoft Content Management Server - custom property settings

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > August 2005 > custom property settings





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author custom property settings
satish

2005-08-26, 7:53 am

Hi Stefan,

How can we set custom properties to postings? as i know, in cms, it is
possible to set custom properties for channels. but for my requirement, i
need to set custom properties to postings if possible to placeholders also.
How can we achieve it in CMS? Also suggest me how to retrieve these values
again using PAPI.

Thanks,
Satish.
Mei Ying [MVP]

2005-08-26, 7:53 am

Hi

You could set custom properties to postings by:
1. Adding the cutom property definition to the template object in Template
Explorer (found in VS.NET)
2. Open a posting based on the template in edit mode.
3. Click Page Properties
4. Click the Custom Properties tab
5. Fill in the custom property value.

And here's a great server control by Stefan that allows you to bypass steps
3-5:
http://www.gotdotnet.com/Community/...03-82436BF956A5

You can access the CustomProperties collectionfrom the PAPI:
e.g.

Posting p = CmsHttpContext.Current.Posting;
string myValue = p.CustomProperties["CustomPropertyName"].Value;

regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Book: http://www.packtpub.com/book/mcms
Contact: meiying...@hotmail.com
---


"satish" <satish@discussions.microsoft.com> wrote in message
news:0C4A7AAD-3E90-4040-8F2D-3587F8B987F5@microsoft.com...
> Hi Stefan,
>
> How can we set custom properties to postings? as i know, in cms, it is
> possible to set custom properties for channels. but for my requirement, i
> need to set custom properties to postings if possible to placeholders

also.
> How can we achieve it in CMS? Also suggest me how to retrieve these values
> again using PAPI.
>
> Thanks,
> Satish.



Stefan [MSFT]

2005-08-26, 7:53 am

Hi Satish,

custom properties can be set to postings - not to placeholders.
You need to define them using MCMS template explorer - similar as you define
placeholder definitions - and then you can assign values to them using the
CustomProperties collection of the Posting object.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"satish" <satish@discussions.microsoft.com> wrote in message
news:0C4A7AAD-3E90-4040-8F2D-3587F8B987F5@microsoft.com...
> Hi Stefan,
>
> How can we set custom properties to postings? as i know, in cms, it is
> possible to set custom properties for channels. but for my requirement, i
> need to set custom properties to postings if possible to placeholders
> also.
> How can we achieve it in CMS? Also suggest me how to retrieve these values
> again using PAPI.
>
> Thanks,
> Satish.



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com