mitoste VIP
Total posts: 14
12 Nov 2016 11:11

Hello, my site I'm using the code <? Php echo $ item-> fields_by_id [4] -> result;?> To display an image you loaded in the category and the page article page.

The image appears on both pages, but I can not set a different dimension through the fild panel. works are the setup of "Full View" while the "List View" does not work.

On the category page, I want the image to be smaller. http://www.centroolistico.org/area/operatori/items/1-operatori-olistici

Full article instead want it to be bigger. http://www.centroolistico.org/area/operatori/user-item/599-stefano/13-rossi-marco

What should I do ? I have to add some piece of code: <? Php echo $ item-> fields_by_id [4] -> result; ?>

Thank you

Last Modified: 17 Nov 2016


mitoste VIP
Total posts: 14
15 Nov 2016 09:17

Hello, no one knows how to help me ??


pepperstreet VIP
Total posts: 3,837
15 Nov 2016 21:16

Hello mitoste,
do you really have different image thumbs for both contexts?
I mean, did you set parameters for list and full view accordingly?
Check the parameter button "resized".

Did you test with default templates to see the different image sizes?

I did a quick test with the same code-snippet in list and full view template.
I have 2 different thumbnails. It works.


Hint: If you already have generated thumbnails and change settings, you might have to delete and re-create new thumbs in --> Cobalt -> Tools


mitoste VIP
Total posts: 14
16 Nov 2016 13:17

I tried to do everything you suggested.

1) use the default template (also entering a very large value for the image nothing happens)

2) run the tools (nothing happens)

As seen from the image I posted a 1000x1000 value but the picture in the category has remained unchanged is the one called with the code is the default. 11

12


mitoste VIP
Total posts: 14
16 Nov 2016 13:22

Hello, doing some attempts have solved.

The problem is in the "Template articles in the list view" setting. the first was set full.php and now putting list.php started operations.

Thanks 13


pepperstreet VIP
Total posts: 3,837
16 Nov 2016 17:03

mitoste The problem is in the "Template articles in the list view" setting.

Not a "problem"... a great feature! ;)

the first was set full.php and now putting list.php started operations.

Exactly, this is the default setting. Hence the parameters' labels.
Frankly speaking, I did not expect you might have changed them.
BTW, the field templates care about the "context" and picking the correct thumb etc. That's why you don't have to add any special code, nor options.


Sergey
Total posts: 13,748
17 Nov 2016 06:45

When you create custom template, you do not need to use field parameters at all. you can pass direct numbers into thumbnail creation method.

And yes, you can set different templates for different views. That is how you make size different in the list and in full view.

Powered by Cobalt