Scenic Living | living with a view on life

TAG | typoscript

Basically what I do implementing a searchbox that needs to be an all pages, is using some plain typoscript to get this running well.

I used to use macina searchbox when I just started working with TYPO3, but getting more feeling with typoscript, I personally like using as less as extensions as possible.

So, how do I do it?

First of all, make sure you implement Indexed Search (setting up the indexing etc.). You really should read the documentation on that - although if you’re like me you’d like me post it here for you!

Second make sure you a subpart Marker (or when using TemplaVoila make sure you map the location to a typoscript object). Usually mine is named lib.searchbox.

Third thing you do is prepare some constants in your TS template:

plugin.tx_indexedsearch.searchUID = 2
plugin.tx_indexedsearch.showAdvanced = 0

The searchUID constant is the page containing your search results (your page with the indexed_search plugin on it).

In the setup you now use the following code to give you the searchbox.

Share and Enjoy:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • eKudos
  • MisterWong
  • Reddit
  • Technorati

, , , , , ,

Here a easy typoscript tip on how to get static content (either a logo, footertext or something else that will be visible on every page of your webbrowser):

[TS begin]

lib.logo = CONTENT
lib.logo {
table = tt_content
select.pidInList = X /* fill in here the ID’s you want here */
select.where = colPos = 0 /* if needed… */
}

[TS end]

And here the same code, ready to copy – paste:

[TS begin]

lib.myObject = CONTENT
lib.myObject {
table = tt_content
select.pidInList =
select.where = colPos =
select.languageField = sys_language_uid
}

[TS end]

Share and Enjoy:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • eKudos
  • MisterWong
  • Reddit
  • Technorati

, , , , , ,

Find it!

Theme Design by devolux.org