Question: Reusing the same partial block in the same template #197

Closed
richard-ive opened this Issue Nov 21, 2012 · 3 comments

2 participants

@richard-ive

Consider

<div class="control-group">
    {+label/}
    <div id="controls">
      {+inputs/}
    </div>
</div>

This is a common structure for bootstrap inputs, so in a form it is used for each and every input. As inputs are generally next to one another, I created a block to create this over an over again easily (dry!), however, if I do the following all my instances of the block are overridden by the last.

{>"bootstrap/control-group"/}
{<label}<label for="name">Name:</label>{/label}
{<inputs}<input type="text" name="name" id="name" />{/inputs}

{>"bootstrap/control-group"/}
{<label}<label for="name">Age:</label>{/label}
{<inputs}<input type="text" name="age" id="age" />{/inputs}

I can only assume I'm not using this in the right way. Can anyone suggest a solution?

Thanks.
Rich

@richard-ive

Sorry, this looks to be a dup of #101

@richard-ive

Any thoughts on this one, guys?

@vybs

closing since it is dupe

@vybs vybs closed this Feb 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment