Drop Down List of Blog Members?

rated by 0 users
This post has 2 Replies | 4 Followers

Not Ranked
Posts 6
Points 75
sdmca Posted: Mon, May 8 2006 7:21 PM
I am interested in putting a list of all bloggers in a community into a drop down list that could be placed on the default page for the Blogs.

Selecting a blog from the drop down would redirect the user to that blog home page.

Has anyone done such a thing? Any help is appreciated!
  • | Post Points: 20
Top 25 Contributor
Posts 2,243
Points 44,790
CS Developers

Nope. But it should be fairly easy to setup.

Arraylist blogs = Weblogs.GetWeblogs(); //returns a list of blogs

//assumes a dropdown list named ddl

ddl.DataSource = blogs;
ddl.DataTextField = "Name";
ddl.DataValueField = "Url";
ddl.DataBind();
ddl.Items.Add(new ListItem("--Select a Blog--"));

Then add a javascript onchange event to the dropdownlist:
onchange="if(this.selectedIndex > 0) window.location = this[this.selectedIndex].value;"

HTH,
Scott

Not Ranked
Posts 6
Points 75
sdmca replied on Tue, May 9 2006 2:07 PM
Scott - One of our developers is going to kick this out. Thank you for your quick reply with the code snippit. Greatly appreciated!
  • | Post Points: 5
Page 1 of 1 (3 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com