Jump to content
huseyin

Image size problem when using first

Recommended Posts

Hello,

i use PW 3.0.148 0n local XAMPP.

It works like this when i have single image field :
$page->image->size(z,y)->url

But as soon as i have multiple images field and add "first" or "first()" or "eq(0)" than i get no output.

ERROR $page->image->eq(0)->size(z,y)->url 
WORKS : $page->image->eq(0)->url 

Can anybody reproduce this and find the reason?

Share this post


Link to post
Share on other sites

How is your inputfield's formatted value configured? try setting it to be formatted as a single item.

  • Like 1

Share this post


Link to post
Share on other sites

I have 2 fields one is single item, the other is multiple items. 

With the single item field it works. But i need also the other multiple items field and with the multiple items field it should work also.. 

Share this post


Link to post
Share on other sites

So sorry.

while checking i realized the field was "file" instead "image". Corrected this and it works now.

Sorry again and thank you for your effort.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...