Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
$this->FolderForBanner() obviously (I think) does not work, because FolderForBanner is not a function.
$this->dbObject('FolderForBanner') does not seem to return anything.
I am actually now just only checking if if imgfolder is set with the code below:
$imgfolder = $this->dbObject('FolderForBanner');
echo 'Not Set';
And nothing I try seems to work...
It always say "Not Set"
I'm really frustrated now. I've wasted hours on something that seems so simple...
Anything else you can think of?
Again thanks for your help and sorry for being so retarded.
Are you sure FolderForBanner exists as a relationship / object. If both of those don't work this its not working. Perhaps try attaching your code.
Nope, I'm not sure, because I actually don't even understand what that means.
I have used a very similar scenario last week, but I needed to access the Folder in the Page.ss, not in the Page.php.
That still works fine in this case too (i.e. I can do $FolderForFadeBanner.RelativePath in the Page.ss and it displays the right path.
I've attached Page.php and Page.ss.
Let me know if you need more.
I just changed your code to
Selected a file and it worked fine - it showed the Folder object. I would double check that if you do Debug::show($this->FolderForBannerID) that it doesn't return 0.
It does work!
You are a genius!
I have no idea what went wrong before (probably a typo, as I could not see clearly anymore after all the time spent on it).
(I did not not about that Debug:: trick either. That will come in handy).
I don't know how to thank you man.
Pfeeew... Now I can get on with my life... ;-)
Thanks a lot.