Need to change smarty file into zend file

2020-05-09 18:04发布

问题:

HI here i have smarty file and i need to convert into zend.. How can i change smarty to zend? its tpl file

<div id="add-user-form" class="form">
    <form action="/account/login" method="post">
    {{input_text type="hidden" name="redirect_url" value=$smarty.server.REDIRECT_URL|default:"/"}}

    <div class="contain">
        <div class="fieldgrp">
            <label>&nbsp;</label>
            <div class="field"><p><h3>Enter&nbsp;User&nbsp;Credentials</h3></p></div>
        </div>
    <div class="fieldgrp">
        <label for="login_name">Username </label>
        <div class="field">{{input_text name="login" id="login_name" class="longfield" maxlength="100"}}</div>
    </div>

    <div class="fieldgrp">
        <label for="login_password">Password </label>
        <div class="field">{{input_text type="password" name="password" id="login_password" class="longfield" maxlength="100"}}</div>
    </div>

    <div class="fieldgrp">
        <label>&nbsp;</label>
        <div class="field"><input type="submit" value="Login" /></div>
    </div>
</div>

</form>

回答1:

You can replace the Smarty code with the HTML it generates....

eg.

{{input_text name="login" id="login_name" class="longfield" maxlength="100"}}

becomes

<input type="text" name="login" id="login_name" class="longfield" maxlength="100">

But past that, this question doesn't really make a lot of sense.