[Typo3] Another Newbie Question

George Hunka geh at panix.com
Mon Jan 31 03:42:05 CET 2005


Dear list,

How are you? I am fine.

I've been playing with the below code for a while and still haven't been 
able to solve my problem: i.e., how to get a searchbox and button all on 
one line in a horizontal alignment, instead of a two-row deep table, 
which seems to be the default rendering of a simple search.

I don't really need an indexed search on the site, just that simple

Search: [SEARCHBOX] [GOBUTTON]

And here's the full template list for the site (search code at the bottom):

# Configure the Auto-Parser:
plugin.tx_automaketemplate_pi1 {

# Read the template file:
content = FILE
content.file = fileadmin/template/main/template_1.html

# Define HTML elements to be wrapped in subpart-comments:
elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY

HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title

TD.all = 1
}

# Prefix all relative paths with this value:
relPathPrefix = fileadmin/template/main/
}

# Menu 1 cObject
temp.menu_1 = HMENU

# First level menu-object, textual
temp.menu_1.1 = TMENU

temp.menu_1.1 {
expAll = 1
# Normal state properties
NO.allWrap = <div class=menu1-level1-no><img 
src=fileadmin/template/main/graphics/diamond_bullet.gif /> | </div>
# Enable active state properties
ACT = 1
ACT.allWrap = <div class=menu1-level1-act><img 
src=fileadmin/template/main/graphics/diamond_bullet.gif /> | </div>
}

# Second level menu-object, textual
temp.menu_1.2 = TMENU
# Second level menu-object, textual
temp.menu_1.2 {
# Normal state properties
NO.allWrap = <div class=menu1-level2-no><img 
src=fileadmin/template/main/graphics/level2_bullet.gif /> | </div>
# Enable active state properties
ACT = 1
ACT.allWrap = <div class=menu1-level2-act><img 
src=fileadmin/template/main/graphics/level2_bullet.gif /> | </div>
}

# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {

# Feed the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1

# Select only the content between the <body>-tags
workOnSubpart = DOCUMENT_BODY

# Substitute ###menu_1### subpart with dynamic menu:
subparts.menu_1 < temp.menu_1

# Substitute ###content### subpart with dynamic content:
subparts.content < styles.content.get

subparts.footer2_left < styles.footer2_left.get
subparts.footer2_right < styles.footer2_right.get

}

# Main TEMPLATE object for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
template =< plugin.tx_automaketemplate_pi1
workOnSubpart = DOCUMENT_HEADER
}

# Default PAGE object:

page = PAGE
page.typeNum = 0
page.10 < temp.mainTemplate
page.headerData.10 < temp.headTemplate
page.10.marks.SEARCH < tt_content.search.30
  page.10.marks.SEARCH.dataArray >
  page.10.marks.SEARCH.dataArray{
  10.label >
  10.type = sword=input
  10.size = 10
  20.label >
  20.type = scols=hidden
  20.value =
  
tt_content.header-bodytext-imagecaption:pages.title-subtitle-keywords-description:tt_content.header
  30.type = stype=hidden
  30.value = L0
  40.type = submit=submit
  40.value = Submit
}

# SET A PAGE id WHERE THE SEARCH OPUTPUT IS SHOWN (must have a content 
element search on it!)
page.10.marks.SEARCH.redirect =79

page.10.marks.SEARCH.image = IMAGE
page.10.marks.SEARCH.image.file = 
fileadmin/template/main/graphics/go_button.gif
# SET AN IMAGE FOR THE SUBMIT BUTTON

Help? Please?

Best,
George



George Hunka wrote:

> Is it necessary to remove the earlier ###SEARCH### marker? And if so, 
> must I change the SEARCH parameter to SEARCHTARGET in the following TS 
> code?
>
> page.10.marks.SEARCH < tt_content.search.30
>  page.10.marks.SEARCH.dataArray >
>  page.10.marks.SEARCH.dataArray{
>  10.label >
>  10.type = sword=input
>  10.size = 10
>  20.label >
>  20.type = scols=hidden
>  20.value =
>  
> tt_content.header-bodytext-imagecaption:pages.title-subtitle-keywords-description:tt_content.header 
>
>  30.type = stype=hidden
>  30.value = L0
>  40.type = submit=submit
>  40.value = Submit
> }
>
> # SET A PAGE id WHERE THE SEARCH OPUTPUT IS SHOWN (must have a content 
> element search on it!)
> page.10.marks.SEARCH.redirect =79
>
> page.10.marks.SEARCH.image = IMAGE
> page.10.marks.SEARCH.image.file = fileadmin/main/graphics/go_button.gif
> # SET AN IMAGE FOR THE SUBMIT BUTTON
>
> Best,
> George
>
> Ingo Renner wrote:
>
>> Am Thu, 27 Jan 2005 21:03:04 -0500 schrieb George Hunka:
>>
>> Hi George,
>>
>>  
>>
>>> search capacity working, but want to change the layout of this 
>>> "search" function to look like this:
>>>
>>> Search: [SEARCHBOX] [SUBMIT BUTTON IMAGE]
>>>   
>>
>>
>> Just add this to your html template:
>>
>>         <form ###SEARCHTARGET### method="post" 
>> name="custom_indexedsearch">
>>           <input type="text" name="tx_indexedsearch[sword]" value=""
>> class="searchinput" />&nbsp;<input type="image"
>> src="fileadmin/campus-dieburg/siteimages/icon_lupe.gif" alt="suchen" />
>>           <input type="hidden" name="tx_indexedsearch[_sections]" 
>> value="0" />
>>           <input type="hidden" name="tx_indexedsearch[pointer]" 
>> value="0" />
>>           <input type="hidden" name="tx_indexedsearch[ext]" value="0" />
>>         </form>
>>
>> and in your ts template define a marker:
>>
>> marks.SEARCHTARGET = TEXT
>> marks.SEARCHTARGET.value = action="index.php?id=59"
>>
>> change 59 to the page id where your search plugin is...
>>
>> HTH
>> Ingo
>> _______________________________________________
>> Typo3-english mailing list
>> Typo3-english at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>>
>>
>>  
>>
>

-- 

George Hunka
geh at panix.com
http://www.ghunka.com





More information about the TYPO3-english mailing list