Filtering postings based on a custom checkbox placeholder co
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Filtering postings based on a custom checkbox placeholder co

 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server
Author Message
smbslt99
Guest





Posted: Wed Nov 09, 2005 5:51 pm    Post subject: Filtering postings based on a custom checkbox placeholder co Reply with quote

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.
Back to top
Stefan [MSFT]
Guest





Posted: Wed Nov 09, 2005 5:51 pm    Post subject: Re: Filtering postings based on a custom checkbox placeholde Reply with quote

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...
Quote:
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.
Back to top
smbslt99
Guest





Posted: Wed Nov 09, 2005 9:51 pm    Post subject: Re: Filtering postings based on a custom checkbox placeholde Reply with quote

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.
Back to top
Alan Taylor
Guest





Posted: Thu Nov 10, 2005 5:51 pm    Post subject: Re: Filtering postings based on a custom checkbox placeholde Reply with quote

Hi there,

Quote:
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.
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB