Mass Edit of a meta field

ssuh's Avatar

ssuh

06 May, 2015 10:38 PM

Is there any way to do a mass edit of a meta field? We created one to show for a-z index, radio button for yes and no.

  1. 1 Posted by Wing Ming Chan on 07 May, 2015 11:47 AM

    Wing Ming Chan's Avatar

    Hi,

    I have two questions for you:

    1. Can you be more specific? Are you trying to edit a metadata field associated with blocks or pages? Do you want to set the value, say, by default to no on every page?

    2. Can you handle web services? If you can, this is probably the easiest way to do mass edit.

    Wing

  2. 2 Posted by ssuh on 07 May, 2015 02:59 PM

    ssuh's Avatar

    1. We are trying to edit pages. Yes, we would like it to be No. We also need to change all existing pages to have the value as No.

    2. We have not used web services yet.

  3. 3 Posted by Wing Ming Chan on 07 May, 2015 03:14 PM

    Wing Ming Chan's Avatar

    As I pointed out, a web service program probably is the easiest way to achieve this. For me, a few lines of code will do the trick. If you are interested in web services, let me know. I will give you some pointers.

    Wing

  4. 4 Posted by ssuh on 07 May, 2015 03:17 PM

    ssuh's Avatar

    Sure, we are definitely interested.

  5. 5 Posted by Wing Ming Chan on 07 May, 2015 03:31 PM

    Wing Ming Chan's Avatar

    I would suggest the following. Look at my Introductory Course. You don't have to go very far. Lesson 1 and Lesson 2 will do. After that, if you are still engaged in web services, then download my library and try the exercises. When you feel comfortable, you can tackle your problem with a single page.

    If you can handle a page, then you need something more complicated. Look at my AssetTree class. Eventually, you need to create an asset tree hooked up with a Base Folder, traverse it, and modify all pages inside. You can do one site at a time, or you can use $cascade->getSites() to get all sites you have on your Cascade instance and loop through them.

    Good luck!

    Wing

  6. Ryan Griffith closed this discussion on 30 Jun, 2015 06:37 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac