Perch:Content appearing in href templates

  • I'm trying to build a template that is for adding hyperlinks onto the page, and have this:

    <a class="btn btn-primary" role="button" style="width: 100%;margin-top: 5px;" href="<perch:content id="url" label="Url" type="text">">

    <perch:content id="text" type="text" label="Text">


    The problem is when this renders out, the output is:

    <a class="btn btn-primary" role="button" href="</perch:content>" style="width: 100%;margin-top: 5px;">



    Note the perch:content being added to the url element, but I can't work out why.

    Any suggestions?

  • Gareth S

    Approved the thread.
  • Hi Mxkert! Thanks for the post :)

    What worked in the end was changing the href quotes to single quotes - seems to be a bug in the parser, that it doesn't like being nested as much.

    Got it working at least, but seems to be ... not matching documentation.