Swapping out SWFs based on page
Permalink 1 user found helpful
My latest C5 implementation is well underway! Woot!
The client provided 5 SWFs that they want swapped out depending on the page the user is on. I used collectionHandle to detect the name of the page and change the SWF name. If the handle doesn't exist in my list, I set a default file name. No problem!
However, there's a careers section. The header swaps to the careers.swf file just fine, but sub pages that contain actual open position content go back to default.swf. What's the best way to check to see if a page is a child of the careers page?
Thanks!
The client provided 5 SWFs that they want swapped out depending on the page the user is on. I used collectionHandle to detect the name of the page and change the SWF name. If the handle doesn't exist in my list, I set a default file name. No problem!
However, there's a careers section. The header swaps to the careers.swf file just fine, but sub pages that contain actual open position content go back to default.swf. What's the best way to check to see if a page is a child of the careers page?
Thanks!
You can see the live example here:
http://www.portlandbiblecollege.org...
The code is setting the theme color based on the section it is under. You could use this same principle to set the SWF