Author Topic

Eivind Marienborg

Sunday 06 February 2005 8:03:54 pm

Comment17549

I'm trying to get the ezhttp to work in an edit template, without any luck.

This is the code that launches the edit template:

       <form method="post" action={"content/action"|ezurl}>

        <input type="hidden" name="ContentNodeID" value="{$:item.object.owner.main_node_id}" />
        <input type="hidden" name="ContentObjectID" value="{$:item.object.owner.id}" />
        <input type="hidden" name="ViewMode" value="full" />
        <input type="hidden" name="privat" value="{$:item.object.data_map.privat.data_int}">

        <input type="hidden" name="NodeID" value="{$:item.object.owner.main_node_id}" />
        <input type="hidden" name="ClassID" value="47">
        <input type="image" name="NewButton" value="svar" src="/share/icons/reply.gif" alt="Svar!" title="Svar!">
        </form>

The variable I'm trying to pick up, is "privat".

This is the code in the edit template (for testing purposes as of now..):

{let privat2=ezhttp('privat','get')}
        <!-- Privat2: {$privat2} -->
{/let}

This code returns nothing.

Having debug enabled, I get the error message "Unknown get variable 'privat'". Am I doing anything wrong, or is it just impossible to use ezhttp in edit templates?