GetSimple Support Forum

Full Version: Page Array
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
PHP Code:
if (in_array(return_page_slug(), array('about-us','another-page','yet-another-page'))) {
... 
(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!