Best way to render name variable twice

Hey, I need to render the variable editor twice in a reference to get this output:

Hancké, Rhodes, and Thatcher 2007
Bob Hancké, Martin Rhodes, and Mark Thatcher, editors, Beyond Varieties of Capitalism: Conflict, Contradiction, and Complementarities in the European Economy . Oxford and New York, NY: Oxford University Press, 2007.

What would be the best way to achieve this? The combination of these macros does not work:

  <macro name="label">
    <choose>
      <if variable="issued accessed" match="any">
        <group delimiter=" ">
          <text macro="contributors-short"/>
          <text macro="date-in-text"/>
        </group>
      </if>
      <else>
        <group delimiter=", ">
          <text macro="contributors-short"/>
          <text macro="date-in-text"/>
        </group>
      </else>
    </choose>
  </macro>
  <macro name="contributors">
    <group delimiter=". ">
      <names variable="author">
        <name and="text" delimiter-precedes-last="always"/>
        <substitute>
          <text macro="editor"/>
          <text macro="translator"/>
          <choose>
            <if type="webpage post-weblog" match="any">
              <text variable="container-title"/>
            </if>
          </choose>
        </substitute>
      </names>
      <text macro="recipient"/>
    </group>
  </macro>

This works well for items with authors, but fails for editors. I get:

Hancké, Rhodes, and Thatcher 2007
Beyond Varieties of Capitalism: Conflict, Contradiction, and Complementarities in the European Economy . Oxford and New York, NY: Oxford University Press, 2007.

The problem is that the editors are rendered in cs:substitute will be suppressed in the remainder of the cite. What would be the best and most elegant way to circumvent this? Should I replace the
first substitute-construction with choose, if, else? Or is there something simpler?

Yes, this exactly; there’s no simpler way.

1 Like

Specifically, I would suggest changing your label macro to not call the other macros, but rather to have its own logic.

1 Like

Ok. Thank you both for your feedback.