You are not logged in.
TXP Freakin Geniuses start your engines.
I want to turn the following articles…
- title:article A / cf_vintage:2007 / cf_release:syrah / cf_action:dump
- title:article B / cf_vintage:2007 / cf_release:merlot / cf_action:hold
- title:article C / cf_vintage:2007 / cf_release:viognier / cf_action:dump
- title:article D / cf_vintage:2008 / cf_release:merlot / cf_action:drink-hold
- title:article E / cf_vintage:2008 / cf_release:syrah / cf_action:hold
- title:article F / cf_vintage:2006 / cf_release:syrah / cf_action:drink
- title:article G / cf_vintage:2008 / cf_release:viognier / cf_action:drink
- title:article H / cf_vintage:2009 / cf_release:viognier / cf_action:drink
into the following table.
Release 2006 2007 2008 2009 merlot - hold drink-hold - syrah drink dump hold - viognier - dump drink drink
the difficulty is that not every vintage has every release, so it’s hard to format empty cells.
Last edited by mrdale (2012-07-12 06:12:17)
Offline
Very nice :) Having a go at it now (but don’t hold your breath…)
<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields
Offline
Perhaps this will fit your requirement. Not sure if I understand 100% your requirements:
<td>
<txp:custom_field name="cf_release"/>
</td>
<td>
<txp:if_custom_field name="cf_vintage" value="2006">
<txp:custom_field name="cf_action"/>
<txp:else/>-</txp:if_custom_field>
</td>
<td>
<txp:if_custom_field name="cf_vintage" value="2007">
<txp:custom_field name="cf_action"/>
<txp:else/>-</txp:if_custom_field>
</td>
<td>
<txp:if_custom_field name="cf_vintage" value="2008">
<txp:custom_field name="cf_action"/>
<txp:else/>-</txp:if_custom_field>
</td>
<td>
<txp:if_custom_field name="cf_vintage" value="2009">
<txp:custom_field name="cf_action"/>
<txp:else/>-</txp:if_custom_field>
</td>
<txp:rocks/>
Offline
mrdale wrote:
almost, but the vintages are dynamic.
I think we need (a lot of) variables. (Still trying… not quite there yet.)
<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields
Offline
If the vintages are dynamic, the number of columns can vary, right? So you could have four columns, or twenty, or whatever. The table head can be done, but I don’t see a way to determine the number of cells needed for the content. I suppose you can’t use a custom field for each vintage?
<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields
Offline
OK, I did it, but I discovered that my old standby chh_if_data doesn’t work inside smd_each
Mighty chuffed… (requires smd_each)… see the solution here»
Last edited by mrdale (2012-07-04 04:05:59)
Offline
mrdale wrote:
Mighty chuffed… (requires smd_each)… see the solution here»
Nice! I really like this kind of tag use :) I was halfway there last night, trying to do it without plugins. But I don’t think that is possible ;)
<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields
Offline