[TYPO3] reusing an object's value for use into the action part of a form-tag

Victor Elsendoorn j.v.elsendoorn at gmail.com
Fri Oct 27 17:23:41 CEST 2006


Dear community,

The past 2 weeks I have been struggling on the following issue: getting the
output of an object into the wrap of another object. Allow me to give the
real life example, by providing my code so-far:


lib.indexedSearch = COA_INT
lib.indexedSearch {
    stdWrap.prefixComment = 2 | lib.indexedSearch

    portletSearch_action = TEXT
    portletSearch_action.typolink.parameter =
{$plugin.tx_indexedsearch.searchUID}
    portletSearch_action.typolink.returnLast = url

    10 = COA
    10 {
        stdWrap.dataWrap = <form action="{$portletSearch_action}"
method="post" accept-charset="utf-8" id="search_form">|</form>
        10 = COA
        10 {
            wrap = <fieldset>|</fieldset>
            10 = TEXT
            10.value = <legend>Search</legend>
            20 = COA
            20 {
                wrap = <div class="form_field">|</div>
                10 = TEXT
                10.data = GPvar : tx_indexedsearch |sword
                10.wrap = <input type="text" name="tx_indexedsearch[sword]"
value="|" id="searchbox-sword" />
                20 = TEXT
                20.value = <input type="submit"
name="tx_indexedsearch[submit_button]" value="Search" id="search_submit" />
            }
        }
    }
}

This code is added to the "setup" of my root-page template and aims for
printing a search-portlet on every page created with templaVoila. Main
problem is however that I am looking for a solution to reuse the outcome of
this portion of the code:

    portletSearch_action = TEXT
    portletSearch_action.typolink.parameter =
{$plugin.tx_indexedsearch.searchUID}
    portletSearch_action.typolink.returnLast = url

into this wrap:
    stdWrap.dataWrap = <form action="{$portletSearch_action}" method="post"
accept-charset="utf-8" id="search_form">|</form>

By using this code I am trying to get the value of the page where the main
indexed-search is taking place and adding it to the action of the portlet
search form, this without wrapping things up into multiple wraps. However I
am not succeeding in getting the variable / object printed within the action
port of the form-tag.

Or let me rephrase my question, I am looking for a good solution to reuse an
object by simply pointing to the value of that object.

I hope someone can point me into the wright direction, for now I starting to
feel a bit hopeless ;-)

Thanks a lot in advance.

Regards Victor



More information about the TYPO3-english mailing list