Current status of the Ning Platform is always available on the Ning Status Blog.

This small tip you may find useful, while setting up a page I wanted categories but I only wanted the member to be able to select one and not any others and so this is how I came to write this tip.

What it does and how you may find it useful.

When you set up a page you are given the choice to be able to add categories for the member to choose from and the default setup for this is for the member to be able to select one or more categories. Ok works fine but suppose you setup a page that you want posts to go into specific categories and not this category and another and another. So this tip changes that multi select box into a single option one and you can see how that looks in the image below. It's easy to install and only a few line of code to use.

In the above image you will see a title added above the category box, this is added by CSS and is optional so you do not have to add it. You can change the wording for it in the css also.

Above the actual categories you will notice it now says ' Select A Category ', again this can be changed for your own wording by editing the code to fir your needs.

This will work for any category selection list and to make it specific to a page you add the page name in the code which you can see in my example or if you want to make this site wide as standard you leave out the page name.

So an example of the page name and how you add them.

Let's start with the page name I have in the code below. This refers to a page called Photos Tips, as you can see in the code Photos and Tips are seperated by a hyphen as urls do not allow spaces, these are added automatically when you add your pages. Also take note that all the letters are in lower case. For any page on our network a class is given call page, so you would always the .page to begin with. So our Photos Tips page will be written like this:

.page-photo-tips

If you are unsure about the page name go to your page you want to make this edit for and open it, then look in the browsers url and you will see this last [art in the ulr and how it refers to that page.

Ok now for the few bits of code you need, don't forget to add your own page name as the code below refers to a page on my site.

/* CSS FOR THE HEADER, THIS IS OPTIONAL THIS GOES IN YOUR DESIGN STUDIO CSS */

/* Add A Small Heading Above Category Selection Box */
.page-photos-tips .entryEditPage-categoryContainer:before{content:"Please Select A Category";display:block; margin:4px }

CUSTOM CODE END OF PAGE BOX IN SITE&PAGES ( DO NOT COPY THIS LINE WITH THE CODE

<script>
// Change the multi select option into a SINGLE one and change the label text
// NOTE Change the page name for your own page
x$('.page-photos-tips .entryEditPage .categorySelectionList').attr('single','single');
x$('.page-photos-tips .entryEditPage .categorySelectionList').removeAttr('multiple');
x$(".page-photos-tips .entryEditPage .categorySelectionList > optgroup[label='Select one or more categories']").attr("label", "Select A Category");
</script>

That's it, hope you find this useful

John :-)

You need to be a member of Ning Creators Social Network to add comments!

Join Ning Creators Social Network

Votes: 0
Email me when people reply –

Replies

  • John now you've got my brain twisted.  (pretty easy to do nowadays)  Why set up categories at all then?   What if we had categories and just removed them all in site builder?  Same diff?

    • Ok let me give you an example, let's say I have created a forum for discussions of animals and I have decided to give categories of animals to talk about.

      So I add, Bears, Horses, Rabbits and Dogs

      So neither of these are related to one another and a member decides to add a post in the dog category but decides they would add it in the Horses and Bears ones too because they can with the multi select option of categories. Now that post will show in all those categories which defeats the object of setting categories for the forum because posts not related to one another are being added everywhere.

      I have had members in the past place a post then add it to every category so it get's seen although it does not belong in that category.

      Ok now back to our animals, now by adding a single category select option the member can now only select one category. So if writing about a dog he can only choose one option which more than likely will be the dog one, of course he could choose something else but his post would not be in the dog category so you could 99% be sure he would choose dog.

      One more example might be photos, you add categories: People Portraits, Landscapes and Vehicles. By setting a single select option and they were adding a People Portrait then more than likely that would be the category they would choose as of course it's not a landscape and by not having a multi select they could then not be crafty and add it to other categories as well.

      If you go to my site and go to the Photos Tips page then try adding a post and you will get an idea of the single select option for the categories.

      Hope that helps explain a little

      John :-)

  • Ah okay.  I'm just the lazy type.  Is this a similar result???  I went into Language Editor and altered the text in the Category box so they can select more than one at a time. 

    3239242?profile=RESIZE_1024x1024

    3239259?profile=original

    3239282?profile=original

    • That only alters the title which of course helps them know how to add multiple categories but the idea behind the Single Select is that they Cannot choose multiple categories but can only choose One.

      • Ahhh okay got it.  I told you I get confused easily nowadays!  lol 

  • NC for Hire

    nice tip Bizz!

    • Thanks JF :-)

This reply was deleted.
 

Some interesting articles related to community management, digital marketing etc. could be found in our digest. Don't hesitate to leave a feedback so we would know that we should continue :-)

Latest Activity

LEO Mobile App Builder updated their profile
Tuesday
Aase Lillian replied to Aase Lillian's discussion
Community - activity page
"Ok, thank you. Please send me details as I have no idea on how to do it. "
Mar 19
Aase Lillian and ⚡JFarrow⌁ are now friends
NC for Hire
Mar 19
⚡JFarrow⌁ updated their profile photo
Mar 18
⚡JFarrow⌁ replied to Aase Lillian's discussion
Community - activity page
"Yes you can add emojis to your community pretty much anywhere you like.
If you need some help…"
Mar 18
Aase Lillian updated their profile
Mar 18
Aase Lillian posted a discussion
Hi all. Is it possible to add emojis to the community? I also wish the activity page to include…
Mar 18
Donna MacShoe updated their profile photo
Mar 6
Adul Rodri is now friends with ANGE.L LUAR and Margarida Maria Madruga
Feb 14
Shweta Sharma updated their profile
Jan 26
catherine martin updated their profile
Jan 16
Donna MacShoe updated their profile photo
Jan 15
More…

Meanwhile, you can check our social media channels