Hello everybody!
The first scenario:
Building a template "text.tpl" for text pages that contain a number of structurally similar text blocks, say blocks that consist of a heading and a list of items.
The second scenario:
Building a template "portfolio.tpl" for portfolio pages that present a number of product types, say type 1 through 4 - the first list. Each product type is presented by a thumbnail of an image that opens a gallery containing more images of the product type (the second list) when clicked. There is additionally a heading and a block of text or some other elements (a third list, potentially, but that one would not be nested into the second list, but stand next to it) next to the gallery thumbnail of the product type to be displayed.
I have succeeded in the first scenario by putting a getResources call into the content field of the resource templated by "text.tpl" that collects the contents of subresources. Each subresource contains the heading and the list items (manually entered, including <li> </li> tags) of one text block. I am now looking to template the subresources so that I can add the items of the text block lists via MIGX. This should be fairly easy to do as long as I can keep getResources pulling the subresources inside. I just assume I can do that. Now my question.
I wonder if I can use the MIGX way of adding items to the text lists for adding these same text blocks to the existing text blocks. This would, I think, look like a resource with a migx type TV that gives me an "add text block" button and
in each grid line I find another button "add list item".
Is something like that feasible at all? That would be a much nicer way of handling that list of lists, with no need for creating and handling many "sub-"resources.
On to the second scenario. I have the following getResources call:
[[!getResources?
&showHidden=`1`
&showUnpublished=`1`
&includeContent=`1`
&includeTVs=`1`
&processTVs=`1`
&sortby=`menuindex`
&sortdir=`ASC`
&tpl=`PF1`
&depth=`1`
&limit=`14`
&hideContainers=`1` ]]
Then in the template chunk PF1, I want to place a MIGX call like the following:
[[!getImageList?
&tvname=`PF1-Galerie`
&tpl=`PF1-Galerie`
]]
where the TV is of image type and the chunk looks approximately as follows, +image being the field that contains each image:
<a href="[[+image]]" [[+_first:empty=`style="display:none"`]] class="zoom project_image"><img src="[[+image]]" alt="" class="" rel="colorbox" width="220px" height="150px"></a>
I created a subresource and added some images to it via the PF1-Galerie TV.
My question is why that doesn't work. Specifically, why the MIGX calls end up returning nothing. The getResources call otherwise works, as other stuff I put into PF1 does appear as usual. Can it be that getResources doesn't parse the getImageList snippet code or something? Otherwise, I have absolutely no clue.
[ed. note: neo2.0 last edited this post 12 years, 8 months ago.]