terminal42 / contao-pageimage

MIT License
12 stars 14 forks source link

Update ModulePageImage.php #3

Closed delirius closed 10 years ago

delirius commented 11 years ago

Image auch an $objPage übergeben, ansonsten bleibt $objPage->pageImage leer.

aschempp commented 11 years ago

not sure if we should modify the global $objPage. What do you think @Toflar ?

Toflar commented 11 years ago

I don't get what the purpose of this should be? $objPage->pageImage contains the settings in the back end so yes, obviously when this is empty it should also be empty. Why adding it?

delirius commented 11 years ago

Sorry, its my problem. I use the objPage->pageimage for a background Image in the FE. Pageimge returns the id, but i need the url.

Am 19.08.2013 um 21:51 schrieb Yanick Witschi notifications@github.com:

I don't get what the purpose of this should be? $objPage->pageImage contains the settings in the back end so yes, obviously when this is empty it should also be empty. Why adding it?

— Reply to this email directly or view it on GitHub.

Freundliche Grüsse Daniel Herren


Atelier Delirius Grafik, Webdesign und Internetprojekte Bahnhofstrasse 102, 5000 Aarau Tel. 062 823 94 03, http://www.delirius.ch

Künstler und mehr: http://www.artisten.info

Content Management System: http://www.contao.org

aschempp commented 11 years ago

What about

$objFile = FilesModel::findByPk($objPage->pageimage);
echo $objFile->path; 

If we change the page value, the next code will not know how to handle the value.