Zum Hauptinhalt springen

Documentation

IMPORTANT

This is the outdated SI-documentation which will be adapted soon. A huge part may be obsolete!

Blog Images

This documentation is intended for advanced users or developers only.

Blog Images

What is a blog image? Blog image is an image that is used to identifies your blog post. In every blogpost on the site, it can be associated with a single image. This image will then be used as image within the featured section, frontpage blog listing and other location which your template/theme provider see it fit.

Accessing Blog Image

Assuming you're accessing blog entry page, you should be able to access $post variable of the blog.

// $post variable should be already be passed to you from view.
// You will be able to use EasyBlogPost object.
$cover_image = $post->getImage();

In an event that $post variable is not defined or you're accessing from a different place, you can always re-instantiate the EasyBlogPost object.

// Instantiate EasyBlogPost object, where $post_id is the id of the desired blogpost
$post = EB::post($post_id);
$cover_image = $post->getImage();
Wir benutzen Cookies
Wir nutzen Cookies auf unserer Website. Einige von ihnen sind essenziell für den Betrieb der Seite, während andere uns helfen, diese Website und die Nutzererfahrung zu verbessern. Du kannst selbst enscheiden, ob du Cookies zulassen möchtest. Bitte beachte, dass bei Ablehnung womöglich nicht mehr alle Funktionalitäten zur Verfügung stehen.