Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.5, getImage(), template
- This topic has 3 replies, 2 voices, and was last updated 10 years, 10 months ago by
Steven Zahm.
-
AuthorPosts
-
10/09/2015 at 2:14 pm #350037
Aaron Silver
GuestI’m working on custom templates. The problem is that I can’t find any documentation online for the $entry Object functions. I see that there is this function:
$entry->getCardImage()But how do I get it to display the Large size instead of the Medium?
Thanks,
Aaron.10/09/2015 at 3:14 pm #350047Steven Zahm
Keymaster@ Aaron
The
getCardImage()is an old deprecated function. I recommend not using it. The documentation for the code can be found in the source files. Most of the $entry Object functions can be found in theclass.entry-output-phpfile.For images you want to the
getimage()function. The documentation for its options are inline with the function, but here is an example:$entry->getImage( array( 'image' => 'logo', 'width' => 300, 'height' => 200 ) );Hope that helps!
10/12/2015 at 12:53 pm #350295Aaron Silver
GuestThanks for the quick reply, Steve. I’m still a bit stymied, though!
Here’s why: There is an “Images” tab on the Settings page that lets me specify sizes for Thumbnail, Medium and Large images.
I assume there’s a way to tell the template which size to use, rather than specifying height and width when calling the function. I expect this to work:
echo $entry->getImage(array('image'=>'photo', 'preset'=>'large'));But I get the message “Photo present is not valid” on the front-end. Where am I going wrong?
Thanks,
Aaron.10/12/2015 at 4:02 pm #350337Steven Zahm
Keymaster@ Aaron
The valid values for the preset are
thumbnail || entry || profile. It is in the docs for the function. Why those names and not thumbnail, medium and large… well, once upon a time that is what the image sizes use to be named. It made sense at the time because that is how they were being used.Hope that helps.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
