Microsoft Content Management Server - Filtering postings based on a custom checkbox placeholder control

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > November 2005 > Filtering postings based on a custom checkbox placeholder control





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 Filtering postings based on a custom checkbox placeholder control
smbslt99

2005-11-09, 5:51 pm

We want to be able to filter news articles based on their topic(s), so,
for instance, all news articles about "international" will show up on
the international page. I've created a custom checkbox placeholder
control based on the example in "Building Websites with Microsoft
Content Management Server". This seems to work fine, but if multiple
checkboxes are selected (like international, speakers, conferences),
the xmlasstring value is "internationalspeakersconferences". I can
still use IndexOf to select all the postings that contain
"international" but I'm wondering if there would be a better way of
doing this. Is there a way that I can access them as separate values?
Thanks.

Stefan [MSFT]

2005-11-09, 5:51 pm

Hi,

XmlAsString should return the XML content - not such a string.
Or are you storing the content like this? That is not well formatted XML.

You should store the content as XML and then use the Xml classes of .NET
framework to access the XML elements and attributes.

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
----------------------


"smbslt99" <elizabethm42@yahoo.com> wrote in message
news:1131547743.148260.265680@f14g2000cwb.googlegroups.com...
> We want to be able to filter news articles based on their topic(s), so,
> for instance, all news articles about "international" will show up on
> the international page. I've created a custom checkbox placeholder
> control based on the example in "Building Websites with Microsoft
> Content Management Server". This seems to work fine, but if multiple
> checkboxes are selected (like international, speakers, conferences),
> the xmlasstring value is "internationalspeakersconferences". I can
> still use IndexOf to select all the postings that contain
> "international" but I'm wondering if there would be a better way of
> doing this. Is there a way that I can access them as separate values?
> Thanks.
>



smbslt99

2005-11-09, 5:51 pm

Oh duh, never mind, when I looked at the page, I just saw
"internationallocal", but when I view source I see:
<Topics><Topic>international</Topic><Topic>local</Topic></Topics>,
which is what I was expecting.

Alan Taylor

2005-11-10, 6:00 pm

Hi there,

>From what I understand when you want to process the content for any one

placeholder for a posting, all content for all placeholders are loaded.
If you have a lot of placeholders on your page this can makes things
very slow. Have you thought about storing data in a custom property on
the posting? I'm assuming you will only ever want to filter on any one
value? If so you could use the following CMS method:

CmsHttpContext.Current.Searches.GetPostingsByCustomProperty

where you test for the values you want to filter by.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com