1

I am designing a personal website. I wanted to display my photo in the side bar in the home page. Below is screenshot-

enter image description here

To get the above display, I have created a basic page in which I have inserted the dummy image using IMCE in CKEditor. Then I have created a view, which is a block of basic page. In this view, the filter criteria is the content title, which should be equal to "my passport size image". Now I have added this block to sidebar.

I am looking for a better way to achieve the same.

2

This is sadly a reasonable solution - one of the easiest. However, as you can see, it's sad because your content - the image - isn't being managed by the entity which is displaying it. This is very confusing when you go back and edit your content. You'll have to wonder - "Where is this being displayed?"

A better solution is to use the BEAN module. This will allow you to build a block type - much like a content type - which has an image attachment. Then, you can manage the display of that image on the block itself. In fact, you can any fields you like to your block type!

https://www.drupal.org/project/bean

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.