create a file object by the files path?
Permalink
Hi folks,
I installed the "random image block"
The "view.php" works with a variable: "$imagePath"
(that means: "/application/files/1815/1161/6070/enigokwag_eki.jpg")
Now I need to get the description of the file at the end of that link.
I tried: "$f = (getFileID($imagePath);" but I guess this is complete nonsens...
Looking forward for some help.
Mathias
I installed the "random image block"
The "view.php" works with a variable: "$imagePath"
(that means: "/application/files/1815/1161/6070/enigokwag_eki.jpg")
Now I need to get the description of the file at the end of that link.
I tried: "$f = (getFileID($imagePath);" but I guess this is complete nonsens...
Looking forward for some help.
Mathias
what version of C5 are you on?
I am on # concrete5 Version
Core Version - 5.7.5.13
Core Version - 5.7.5.13
Wow. Goody!!!!
Thank You! That works great.
I even can put the "$fv" in a different div to display the description in a little overlay.
But how can php know, which file description is needed? Is it the last one in the code before?
Best Mathias
Thank You! That works great.
I even can put the "$fv" in a different div to display the description in a little overlay.
But how can php know, which file description is needed? Is it the last one in the code before?
Best Mathias
that's because the plugin's developer had a good idea of making $fv available to the view but because it's not used there, you would have had to check the controller to find out about it.
if you go through the controller and see this kind of lines:
Then $somevariable is available to the view
$this->set('somevariable', 'value of the variable');
Then $somevariable is available to the view