collective/collective.cover — pull request #364 by lentinj (2013-11-27 14:09:08+00:00)
Title: Pass the parent's data to the child tile

I have a tile on my site that changes it's layout depending on how wide the column / group is. At full width it puts it's image to the right, uses big fonts. At 4-cell widths it squishes the image below. I can do most of this in css, e.g. ".width-4 .promoTile". However this plan falls apart when I want to vary the markup based on cell width, e.g. to use a different ratio image.

The patch below adds the data from the container to the Tile URL, so I can then pick this up in the tile. This works, however is somewhat messy. Possibly it should pass just the width through, rather than everything. If there's a better way of getting the width of the tile from the tile please let me know, or if you think this is okay then I'll update tests before merging.