GetSimple Support Forum

Full Version: Get a field from all pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,
hope this is not a repeated questions, but I tried searching here and googling, but couldn't find the answer.

What I'm currently trying to do - just briefly - is an affialite shop where I get data from suppliers' xml file and parse those into pages.

I am going to use a special field (via special fields plugin) which will store the URL to the image of the product...

What I would like to do next is pull this field from all pages in my GetSimple and put that to a list...is that possible?

Basically I just want to have a page with a lot of product thumbnails leading to a getsimple page with description and bigger picture...

Thanks in advance for any help!
I do not know how that plugin works but page fields are auto cached into a global pagesArray.
Read the wiki on page cache
First of all, thank you for pointing me into the right direction (hopefully)

I believe/hope the plugin just adds another field to pages
should this work?

Code:
function listPages(){
    global $pagesArray;
$pages= subval_sort($pagesArray,'menuOrder');
     foreach ($pages as $page) {
         echo '<ul>';
        echo '<li>'.$page['MYCUSTOMFIELDHERE'].'</li>';
        echo '</ul>';
    }
}

I am writing from a mobile device so I can't test it...but in your opinion (or anyone else's for that matter) would this code work the way I think it should?

Thanks again!