I now am a step closer I think, any help would be very much
appreciated.

Using:
$path = Router::url();
        $pathl = strlen($path) - 1;
        if($path{$pathl} !== '/')
        {
                $imagePath = IMAGES_URL . 'base/rotate/' . $imgBase . '/' . 
$session-
>read('sessionImg.' . $imgBase);
        }
        else
        {
                $imagePath = '../' . IMAGES_URL . 'base/rotate/' . $imgBase . 
'/' .
$session->read('sessionImg.' . $imgBase);
        }
fixes the problem I mentioned before.

But if I go another level deep, i.e. domain.com/section1/section2
I lose it again.

Thanks for any direction as to a more extensible fix for this.

On May 19, 12:47 pm, clrockwell <[EMAIL PROTECTED]> wrote:
> Forgot: cakephp 1.2, WAMP
>
> On May 19, 12:46 pm, clrockwell <[EMAIL PROTECTED]> wrote:
>
> > Hello all,
>
> > I have an element which displays an image based on a session variable,
> > problem is that if I visit:
> > "domain.com/section"
> > I see the image, but visiting:
> > "domain.com/section/" (with trailing slash)
> > does not show the image.
>
> > My image call is:
> > <?php echo IMAGES_URL; ?>base/rotate/<?php echo $imgBase;?>/<?php echo
> > $session->read('sessionImg.' . $imgBase);?>
>
> > The entire element is:
> > <style type="text/css" media="all">
>
> >         #header_right { background: #FFF url(<?php echo IMAGES_URL; ?>base/
> > rotate/<?php echo $imgBase;?>/<?php echo $session-
>
> > >read('sessionImg.' . $imgBase);?>) 0 0 no-repeat; }
>
> > </style>
>
> > Thanks much for taking the time to look.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to