If the PHP code is executing properly, lightbox has no way of knowing it's there, as it is exactly the same on the client side (where lightbox operates) as any hard coded URL.
I do know that in PHP, unlike in javascript, semicolons must terminate statements like echo, setting variables, etc. So your code should at least be:
Code:
<a href="<?php echo $this->getGalleryUrl($_image); ?>" rel="lightbox">
Additionally, I am not familiar with the:
syntax, it looks wrong to me, but that could just be my inexperience with PHP.
One way to test if your PHP token is getting resolved as expected is to look at the live page with the browser's 'view source'. It will show exactly how the code is being served. If it doesn't look right there, the PHP part is messing up somewhere. It could be the token itself, how it's written or the value it contains that's off though, or a combination.
It's also possible that your code could be correct (but I'm pretty sure about it's needing that semicolon), but that the image path and filename it produces points to a non-existent file.
Bookmarks