Announcement

Collapse
No announcement yet.

Loop through a Custom Field Group

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Loop through a Custom Field Group

    Is there a built-in way to loop through all of the custom fields assigned to a particular Custom Field Group? I'd like to create a "Product Highlights" group that I can loop through to build a bullet-point list or table, while still being able to use those same fields individually in other places. I was looking around for an array variable for this but was unable to find one. Am I missing something?

    I know I can accomplish similar results a couple of other ways, but this seemed like the most flexible option if it exists.

    Thanks,
    Josh

    #2
    Re: Loop through a Custom Field Group

    Is there any way to loop through custom fields assigned to Custom Field Groups

    Comment


      #3
      Re: Loop through a Custom Field Group

      I don't know the answer offhand. But if I had to do this for a project, I'd start by using the Token List or some similar technique to look at all the variables that are available for custom fields in the page template. If they aren't actually divided into groups, there might be a group ID that would allow you to write your own code to find the ones assigned to a specific group.

      If that doesn't work, I guess you'll have to do some direct DB queries to read the grouping info. I think one or more of the "Tool" modules provide a way to do this.

      HTH --
      Kent Multer
      Magic Metal Productions
      http://TheMagicM.com
      * Web developer/designer
      * E-commerce and Miva
      * Author, The Official Miva Web Scripting Book -- available on-line:
      http://www.amazon.com/exec/obidos/IS...icmetalproducA

      Comment

      Working...
      X