-----------------------
Page 1
- Subpage 1
- Subpage 2
- Subpage 3
- Subpage 1
- Subpage 2
- Subpage 3
How do I get the image1.jpg on the Page 1 and all the Page's 1 subpages, and the image2.jpg on the Page 2 and the Page's 2 all subpages?
I don't want to write a huge ifelse code where I put all the page's and subpage's names.
Code: Select all
global $gCms;
$thispage = '';
$thispage = $gCms->variables['page_name'];
if ($thispage == the_name_of_one_of_your_pages)
echo "something_you'd_like_written_to_this_page";
elseif ($thispage == the_name_of_another_one_of_your_pages)
echo "something_else_you'd_like_written_to_this_page";
else
echo "something_you'd_like_written_as_your_default";