Share » Forums » Setup & design » multiple section show (nesting)

multiple section show (nesting)

multiple section show (nesting)

Wednesday 18 August 2004 3:24:22 am - 4 replies

Author Message

Bård Farstad

Wednesday 18 August 2004 4:10:31 am

This will not work. You cannot have multiple section-else statements and they don't support the show parameter.

But can't you just have four different sections for this? I.e. remove the section-else and replace it by section. Then you just need to add the correct show syntax for the default block, which should be something like:

show=and($node.data_map.bilde1.has_content|not, $node.data_map.bilde2.has_content|not) 

--bård

Documentation: http://ez.no/doc

Trond Åge Kvalø

Wednesday 18 August 2004 5:52:26 am

Thanks for replying, Bård.

You're probably right about your solution. But this is how I solved it:

<table>
{section show=and($node.data_map.bilde1.has_content, $node.data_map.bilde2.has_content) }
  <tr>
    <td>picture1</td>
    <td>text</td>
    <td>picture2</td>
  <tr>
{section-else}
  {section show=and($node.data_map.bilde1.has_content, $node.data_map.bilde2.has_content|not) }
    <tr>
      <td>picture1</td>
      <td colspan="2">text</td>
    <tr>
  {section-else}
    {section show=and($node.data_map.bilde1.has_content|not, $node.data_map.bilde2.has_content) }
      <tr>
        <td colspan="2">text</td>
        <td>picture2</td>
      <tr>
    {section-else}
      <tr>
        <td colspan="3">text</td>
      <tr>
    {/section}
  {/section}
{/section}
</table>

Hmm... It seems that this is actually a mix of my first post and your reply.

Anyway it works as expected now, and if it works..... don't fix it. Right? :-)

trondåge

Bård Farstad

Wednesday 18 August 2004 5:55:27 am

Yes, if it's not broken then don't fix it ;)

Cheers,

--bård

Documentation: http://ez.no/doc

Edward Eliot

Tuesday 31 August 2004 7:37:32 am

Unless it is inefficient of course!

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu