2011-03-22, 09:44:23
The way I'd do this is.
o - install my customfields and pages plugins (shameless plug I know )
o - Add a custom field and call it "image"
o - Create your base page - call it 'portfolio' and leave it blank.
o - Now create each of your pages and make the parent "portfolio"
o - add the following function to your themes functions.php
o - then in your main template just call "getPortfolio();" where you want to display the list of images....
Hope it helps....
Mike
Plugins are here:
http://get-simple.info/extend/plugin/customfields/22/
http://get-simple.info/extend/plugin/page-caching/65/
o - install my customfields and pages plugins (shameless plug I know )
o - Add a custom field and call it "image"
o - Create your base page - call it 'portfolio' and leave it blank.
o - Now create each of your pages and make the parent "portfolio"
o - add the following function to your themes functions.php
Code:
function getPortfolio(){
$subpages=getChildren('portfolio');
foreach ($subpages as $page){
$title=returnPageField($page,'title');
$image=returnPageField($page,'image');
echo '<li>';
echo "<a href='index.php?id=".$page."'><img src='".$image."' alt='".$title."' /></a><br/>";
echo "</li>";
}
}
o - then in your main template just call "getPortfolio();" where you want to display the list of images....
Hope it helps....
Mike
Plugins are here:
http://get-simple.info/extend/plugin/customfields/22/
http://get-simple.info/extend/plugin/page-caching/65/