Dies ist eine alte Version des Dokuments!


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
            

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/
  }
}

setup.ts

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

page = PAGE
page {
  [...]
}

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/

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

Public

Cookies helfen bei der Bereitstellung von Inhalten. Durch die Nutzung dieser Seiten erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Rechner gespeichert werden. Weitere Information
  • provider_extension.1538401486.txt.gz
  • Zuletzt geändert: 01/10/2018 15:44
  • von Thomas Berscheid