Prev | Current Page 226 | Next

Rob Allen, Nick Lo, and Steven Brown

"Zend Framework in Action"

To add each document, we take advantage of the
Licensed to Menshu You
Please post comments or corrections to the Author Online forum at
http://www.manning-sandbox.com/forum.jspa?forumID=329
SearchIndexer??™s getDocument() function that creates a document using the model??™s
getSearchIndexFields() function, hence reusing the code and making this function very simple.
We now have complete control over creating search indexes within the Places website and can now look at
creating a search form to allow the user to search and then view the results.
8.3.2 Creating the search form and displaying the results
The search form for Places is very simple as it consists only of a single input text field and a Go button. This
form is available on every page and so the HTML for it is contained in the site template located in
application/views/scripts/site.phtml as shown in listing 8.10.
Listing 8.10: Asimple search form in HTML

Search:



1
2


1 Text field for search terms
2 Go button to initiate search
The search form??™s action field is the index action in the search controller which is where the actual
searching takes places.


Pages:
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
mapy polski Paula Atherton mafia poradnik tłumaczenia rosyjski warszawa Krople citrosept