4

I've created a content type News with different fields, one of the fields is field collection that allows administrator to upload unlimited images with a detailed description text.

I used Views module to display a list of news on the homepage, now I want to limit the number of displayed images within field collection to max 2 per news and when users clicks on the news to see full detail page they will be able to see all images that have been added by administrator.

Is there a way to limit number of items in the frontend but keep unlimited in the backend (admin)?

2
  • 1
    I'm quite sure Views already handles this. Have you checked what settings are available when you select the field for the view?
    – hampusn
    Sep 10, 2012 at 16:04
  • Yes you're right, I was not paying attention to it "Multiple field settings" configuration. Thanks a million.
    – Aboodred1
    Sep 10, 2012 at 16:21

2 Answers 2

1

When you use field collection in Views, go to the settings of field collection field in views and follow these steps :

1. There is a setting named "Multiple Field Setting"
2. Enter the number of pictures in the textfield you want to show in Field 'Display'

and you also specify Start from to where to start.

0

in order to do this you need direct access for the image field that exist in the field collection, so you need to add relation to field collection and then you add that image field directly.

In this way you will have control over the image field only, not the whole field collection, then you can limit the number of images in the Multiple Field Setting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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