Sie befinden sich hier: start » provider_extension

Aufbau einer Provider Extension

Action disabled: source

Aufbau einer Provider Extension

└── ibkprovider
    ├── Configuration
    |   ├── ExtensionBuilder
    |   ├── TCA            
    |   └── TypoScript
    |       ├ config.ts
    |       ├ constants.ts      
    |       └ setup.ts      
    ├── Documentation.tmpl
    |   ├── Administrator
    |   ├── [...]
    |   └── User                        
    └── Resources
        ├── Private
        |   ├── Ke_search
        |   ├── News
        |   ├── Layouts
        |   ├── Partials
        |   └── Templates
        └── Public
            ├── bootstrap
            ├── css
            ├── js               
            └── lib
            

Configuration

TypoScript

config.ts

config {
  xmlprologue = none
  uniqueLinkVars = 1
  linkVars := addToList(L(1),type(3))
  absRefPrefix = /
  cache_period = 1
  
  ## Character sets
  renderCharset = utf-8
  metaCharset = utf-8
  
  ## Sys Variablen
  sys_language_uid = 0
  sys_language_overlay = 1
  sys_language_mode = content_fallback
 
  ## Sprache
  language = de
  locale_all = de_DE.UTF-8
  htmlTag_langKey = de
  
  ## META Angaben
  pageTitleFirst = 1
  noPageTitle = 1
  sendCacheHeaders = 1
  message_page_is_being_generated = Die angeforderte Seite wird Ihnen gleich angezeigt.
  
  spamProtectEmailAddresses = 2
  spamProtectEmailAddresses_atSubst = (at)
  
  ## RealURL Configuration
  tx_realurl_enable = 1  
  simulateStaticDocuments = 0
}

constants.ts

##############################################################
### IBK Provider Extension - Template Paths                ###
##############################################################
    
plugin.tx_ibkprovider {
  view {
    # cat=plugin.tx_ibkprovider/file; type=string; label=Path to template root (FE)
    templateRootPaths {
      10 = EXT:ibkprovider/Resources/Private/Templates/
    }
    # cat=plugin.tx_ibkprovider/file; type=string; label=Path to template partials (FE)
      partialRootPaths {
      10 = EXT:ibkprovider/Resources/Private/Partials/
    }
    # cat=plugin.tx_ibkprovider/file; type=string; label=Path to template layouts (FE)
    layoutRootPaths {
      10 = EXT:ibkprovider/Resources/Private/Layouts/
    }
  }
}

##############################################################
### KE Facetted Search - Template Paths Search Box         ###
##############################################################

plugin.tx_kesearch_pi1 {
  templateRootPath = EXT:ibkprovider/Resources/Private/Ke_search/Templates/
  templateRootPaths {
    10 = EXT:ibkprovider/Resources/Private/Ke_search/Templates/
  }
}

In neueren Versionen von KE_SEARCH werden die Constants in der Extension selber so gesetzt, dass man sie nun mit dieser Eingabe überschreiben kann:

plugin.tx_kesearch.templateRootPath = EXT:ibkprovider/Resources/Private/Ke_search/Templates/

setup.ts

Bis zur Version 8.7 von TYPO3:

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ibkprovider/Configuration/TypoScript/config.ts"> 
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ibkprovider/Configuration/TypoScript/constants.ts"> 

page = PAGE
page {
  [...]
}

Seit der Version 9.5 von TYPO3:

@import "EXT:ibkprovider/Configuration/TypoScript/config.ts" 

page = PAGE
page {
  [...]
}

Resources

Private

Page Template

Eingebunden über:
ext/ibkprovider/Resources/Private/Templates/

<f:section name="div_content">
  <f:cObject typoscriptObjectPath="lib.reiseberichte" />
  
  <f:format.raw>{page_content_h1}</f:format.raw>
  <f:format.raw>{page_content_h2}</f:format.raw>
    
  <f:if condition="{page_content_grid}">
    <div class="page_content_grid">
      <f:format.raw>{page_content_grid}</f:format.raw>  
    </div>
  </f:if>
    
  <f:format.raw>{page_content_text}</f:format.raw>
  <f:if condition="{page_accordion}">
    <div id="accordion">
      <f:format.raw>{page_accordion}</f:format.raw>  
    </div>
  </f:if> 
  <f:format.raw>{kasten_content_zeile}</f:format.raw>
    
  <f:cObject typoscriptObjectPath="lib.sitemap" />
  
  <div class="div_kasten">
    <f:cObject typoscriptObjectPath="lib.werbebanner" />
  </div>
  
</f:section>

Einbindung eines eigenen Template für das Formular auf der Startseite der Suche.

<f:layout name="General" />
<!--
=====================
Templates/SearchForm.html
-->
<f:section name="content">
  <form method="get" 
    id="form_kesearch_pi1" 
    name="form_kesearch_pi1" 
    action="{f:uri.page(pageUid: targetpage)}">
    <fieldset class="kesearch_searchbox">
      <f:if condition="{targetpage}">
        <input type="hidden" name="id" value="{targetpage}" />
      </f:if>
      <f:if condition="{lparam}">
        <input type="hidden" name="L" value="{lparam}" />
      </f:if>
      <f:if condition="{mpparam}">
        <input type="hidden" name="MP" value="{mpparam}" />
      </f:if>
      <f:if condition="{typeparam}">
        <input type="hidden" name="type" value="{typeparam}" />
      </f:if>
  
      <div class="kesearchbox">
        <input type="text" 
          id="ke_search_sword" 
          name="tx_kesearch_pi1[sword]" 
          value="{searchword -> f:format.raw()}" 
          placeholder="{searchwordDefault}" />
        <div class="clearer">&nbsp;</div>
      </div>
 
      <input id="kesearchpagenumber" type="hidden" name="tx_kesearch_pi1[page]" value="{page}" />
      <input id="resetFilters" type="hidden" name="tx_kesearch_pi1[resetFilters]" value="0" />
      <input id="sortByField" type="hidden" name="tx_kesearch_pi1[sortByField]" value="{sortByField}" />
      <input id="sortByDir" type="hidden" name="tx_kesearch_pi1[sortByDir]" value="{sortByDir}" />
 
      <f:if condition="{filters}">
        <div id="kesearch_filters">
          <f:render partial="Filters" 
            arguments="{conf: conf, numberofresults: numberofresults, resultrows: resultrows, filters: filters}" />
        </div>
      </f:if>
  
      <span class="submitbutt"><input type="submit" class="button button_search_list" value="Finden" /></span>
    </fieldset>
  </form>
</f:section>

Boxen

Eingebunden über:
ibkprovider/Resources/Private/Partials/

<f:if condition="{0:pageuid} != {0:'290'}">
  <f:render partial="Box/Boxsuche" />  
</f:if>

<f:if condition="{0:pageuid} != {0:'490'}">
  <f:render partial="box/Boxwohnung" />  
</f:if>

<f:if condition="{0:pageuid} != {0:'240'}">
  <f:render partial="Box/Boxnews" />  
</f:if>

<f:render partial="Box/Boxaktion" />

<f:render partial="Box/Boxwetter" />

<f:render partial="Box/Boxaktuell" />  

Eingebunden über:
ibkprovider/Resources/Private/Partials/Box/

<div class="div_box">
  <div class="div_box_titel">
  Aktuelles
  </div>
  <div class="div_box_inhalt">
  <f:cObject typoscriptObjectPath="lib.aktion" />
  </div>
</div>
<div class="div_box">
  <div class="div_search">
    <div class="tx-kesearch-pi1">
      <form method="get" id="form_kesearch_pi1" name="form_kesearch_pi1"  action="/index.php?id=290">    
        <input type="hidden" name="id" value="290" />
          <div class="kesearchbox">
            <input type="text" 
              id="ke_search_sword_box" 
              name="tx_kesearch_pi1[sword]" 
              value="" 
              placeholder="Geben Sie einen Suchbegriff ein" />
            <input class="button button_search_box" type="submit" value="Suchen" />
        </div>
      </form>
    </div>
  </div>  
</div>

Public