Generate thumbs from ref-images from related catalog
Maybe not very right subject, but I don't know how to describe tye problem better.
I have several catalogs that are corresponding to each other.
For example, item of main catalog can have several draws, that are stored in another catalog, and I need to view this draws from main catalog item, and then click on it and open this draws with ability to download.
Everything is perfect, but I need to view the thumbs.
And becouse I get the image frem ref, Contao doesn-t generate it:
Code:
Array
(
[0] => Array
(
[id] => 4
[catalog_name] => ???????
[parentJumpTo] => 3
[tablename] => cat_profiles
[showLink] => 1
[class] => first last even
[data] => Array
(
[draws] => Array
(
[label] => ???????
[type] => tags
[raw] => 1,2
[value] => ?????? 1, ?????? 2
[ref] => Array
(
[1] => Array
(
[id] => 1
[pid] => 3
[sorting] => 128
[tstamp] => 1281693831
[name] => ?????? 1
[pict] => tl_files/draws/draw1.png
[file] => tl_files/draws/English Figure 01 Gerard Classic Tile Rev C.pdf
[parentJumpTo] => 0
[parentLink] => View the item details
[parentUrl] => profiles-and-colors/items/1.html
)
[3] => Array
(
[id] => 2
[pid] => 3
[sorting] => 256
[tstamp] => 1281693848
[name] => ?????? 2
[pict] => tl_files/draws/draw2.png
[file] => tl_files/draws/English Figure 02 Gerard Heritage Tile Rev C.pdf
[parentJumpTo] => 0
[parentLink] => View the item details
[parentUrl] => profiles-and-colors/items/2.html
)
)
)
)
)
)
I get big images like this:
Code:
<?php foreach ($this->entries[0]['data']['draws']['ref'] as $entry): ?>
[img]<?php echo $entry[pict]; ?>[/img]
<?php endforeach; ?>
But how to make thumbs?
I've tried to use $this->getImage, but nothing works.
What shall I do?
Thank you
Re: Generate thumbs from ref-images from related catalog
Try the image inserttag. Why don't you use the reference module on the reader page?
Re: Generate thumbs from ref-images from related catalog
Reference module... I'll try, thanx.
But in any case, I need to insert this inside the reader's page content...
How can I insert a module in the template? I can-t find this info in Contao docs...
Something like this?
<?php {{image::tl_files/image.jpg?width=200&height=150}} ?>
Or not inside PHP-tag?
Re: Generate thumbs from ref-images from related catalog
why would you want to insert a module in the page content. Just do this:
Catalog Reader
- field 1
- field 2
[no go-back link]
Catalog Reference
- field 3 expanded into it's referencing fields
Catalog Reader (duplicate of above, but changes)
- field 4
- field 5
[now WITH go-back link]
See easy peasy.
PS. Inserttags are template replaced, so no need to php them.
Re: Generate thumbs from ref-images from related catalog
Thanx. Image insert tag worked perfect)
Reference module needs to be explored))
PS / offtop
:?: Thyon, your catalog — is maybe the most usefull and powerfull Contao extension (bravo). Have you any plans to extend it by adding a shopping cart and some shop-aimed extensions (e.g. adding a drop-down list of item modifications)?
Re: Generate thumbs from ref-images from related catalog
Isotope is already a e-commerce solution.
PS. Its not my catalog, its a group effort. I've also disconnected from the project, because it's too much time involved.
Re: Generate thumbs from ref-images from related catalog
Quote:
Originally Posted by Terion
Thanx. Image insert tag worked perfect)
Reference module needs to be explored))
PS / offtop
:?: Thyon, your catalog — is maybe the most usefull and powerfull Contao extension (bravo). Have you any plans to extend it by adding a shopping cart and some shop-aimed extensions (e.g. adding a drop-down list of item modifications)?
There already exists some shopping extension which connects to the catalog.
Search for chShop in the ER.
Regards
Chris