GetSimple Support Forum
Page Array - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Page Array (/showthread.php?tid=5218)



Page Array - lnickel - 2013-09-27

Hey all!

I am switching out subheaders (images/divs) on my interior pages with a pretty simple conditional

PHP Code:
if (return_page_slug() == 'about-us') {
echo 
'<div class="InteriorAbout">Some copy here</div>';
} else { ...} 

Client wants this to happen on more pages....can I somehow use an array with this rather than writing out a bunch of if's?

Noob bowing down!!!

Thanks!


RE: Page Array - Carlos - 2013-09-27

PHP Code:
if (in_array(return_page_slug(), array('about-us','another-page','yet-another-page'))) {
... 



RE: Page Array - lnickel - 2013-09-27

(2013-09-27, 15:46:25)Carlos Wrote:
PHP Code:
if (in_array(return_page_slug(), array('about-us','another-page','yet-another-page'))) {
... 

Much appreciated Carlos!!!! I'll give it a go!