Express Custom View Template Error
Permalink 1 user found helpful
Following the documentation here
http://documentation.concrete5.org/developers/express/using-the-exp...
I've managed to get a custom template up and running but I've run into an issue where the attribute is something other than a string.
The line <?=$expressobject->getExpressObjectAttribute()? returns the error “Object of class could not be converted to string”. Normal text string attributes are fine.
I've struggled through the core code and doctrine documentation for two days but I'm no further forward.
Any ideas please anyone?
http://documentation.concrete5.org/developers/express/using-the-exp...
I've managed to get a custom template up and running but I've run into an issue where the attribute is something other than a string.
The line <?=$expressobject->getExpressObjectAttribute()? returns the error “Object of class could not be converted to string”. Normal text string attributes are fine.
I've struggled through the core code and doctrine documentation for two days but I'm no further forward.
Any ideas please anyone?
Worked this out at last. The attribute was a file and Concrete needed to know that it was the url of the file that I was after. Therefore the line needed to be
<?=$drawing->getDrawingPdf()->getURL();?
where drawing was the Express Object handle and DrawingPdf was the attribute handle drawing_pdf
<?=$drawing->getDrawingPdf()->getURL();?
where drawing was the Express Object handle and DrawingPdf was the attribute handle drawing_pdf
Object of class DoctrineProxies\__CG__\Concrete\Core\Entity\File\File could not be converted to string