Dear Gen, thanks for your reply.
Here's what I use currentl, but it doesn't work.
function mbd_matrix_renderLegendOrWork($atts, $content = null) { global $legendShown; if ($legendShown) { return '<tr><td>[wpv-post-body view_template="Single work in matrix"]</td>'; } else { $legendShown = true; return '<tr><td>Legend</td>'; } } add_shortcode('mbd_matrix_renderLegendOrWork', 'mbd_matrix_renderLegendOrWork');
I then use this shortcode together with another one that reset the global flag like this:
[wpv-layout-start] <!-- wpv-loop-start --> [mbd_matrix_reset] <table> <wpv-loop wrap="6" pad="true"> [wpv-item index=1] [mbd_matrix_renderLegendOrWork] [wpv-item index=other] <td>[wpv-post-body view_template="Single work in matrix"]</td> [wpv-item index=6] <td class="last-in-row">[wpv-post-body view_template="Single work in matrix"]</td></tr> </wpv-loop> </table> <!-- wpv-loop-end --> [wpv-no-posts-found][wpml-string context="wpv-views"]<strong>No projects currently.</strong>[/wpml-string][/wpv-no-posts-found] [wpv-layout-end]
This works in principal, but the "wpv-item index=1" consumes one project, whether I show it or not. So one thing I could do is create an empty "fake" project and just make sure it's never shown. Thing is, project are also shown in other cases, so that would require quite some hacks everywhere.
Thanks for your assistance
Andreas