[Typo3] Problems using extension rlmp_tmplselector

Ricardo Scachetti Pereira ricardo at tdwg.org
Wed Nov 9 15:22:58 CET 2005


    Hi folks,

    I'm having some weird problems with extension rlmp_tmplselector.
    I configured it in a way that I can change the main and sub 
templates for any pages in my website. The correct HTML templates are 
selected for both sub and mail. However, the resulting html page has a 
wrong path to the CSS stylesheets. It gets something like this:

<link href="fileadmin/template/subres/stylesheet.css" rel="stylesheet" 
type="text/css" />
<link href="fileadmin/template/subres/template2_styles.css" 
rel="stylesheet" type="text/css" />

    I presume that there is a missing slash between sub and res. The 
correct path is fileadmin/template/sub/res/template2_styles.css

    Another weird thing is that if I comment out the following lines in 
my TS setup record, I start to get a blank page as a result:

plugin.tx_rlmptmplselector_pi1.templatePathMain = fileadmin/templates/main/
plugin.tx_rlmptmplselector_pi1.templatePathSub = fileadmin/templates/sub/

    As usual, any help is greatly appreciated.
    Best regards,

Ricardo

PS. Just for reference, below is my complete TS record.

# ------------------------
# News plugin configuration
# ------------------------
plugin.tt_news {
  dontUseBackPid = 1
  useHRDates = 1
}

# ------------------------
# Spam Protection for Email
# ------------------------
config.spamProtectEmailAddresses = 2
config.spamProtectEmailAddresses_atSubst = (at)

# ------------------------
# RealURL stuff
# ------------------------
config.simulateStaticDocuments = 0
config.baseURL = 1
config.tx_realurl_enable = 1

# ------------------------
# Configuring the template selector plugin
# ------------------------
plugin.tx_rlmptmplselector_pi1 {

      // Define the paths leading to our HTML template files
   #templatePathMain = fileadmin/templates/main/
   #templatePathSub = fileadmin/templates/sub/

      // Define the filenames used as the default HTML templates
   defaultTemplateFileNameMain = template_1.html
   defaultTemplateFileNameSub = ct_1.html

      // If there is a page having no template selected, use a template
      // selected earlier in the rootline. If there is none, use the default
    inheritMainTemplates = 1
    inheritSubTemplates = 1
}

# ------------------------
# Configuring the Auto-Parser for main template:
# ------------------------
plugin.tx_automaketemplate_pi1 {
    content < plugin.tx_rlmptmplselector_pi1
    
    # Here we define which elements in the HTML that
    # should 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
        TR.all = 1
    }

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

# ------------------------
# Menu 1 cObject - vertical, three-level menu
# ------------------------
temp.menu_1 = HMENU
# First level menu-object, textual
temp.menu_1.1 = TMENU
temp.menu_1.1 {
    # Normal state properties
    NO.allWrap = <div class="menu1-level1-no">* | </div>
    # Enable active state and set properties:
    ACT = 1
    ACT.allWrap = <div class="menu1-level1-act">* | </div>
}

# Second level menu-object, textual
temp.menu_1.2 = TMENU
temp.menu_1.2 {
    # Normal state properties
    NO.allWrap = <div class="menu1-level2-no">** | </div>
    # Enable active state and set properties:
    ACT = 1
    ACT.allWrap = <div class="menu1-level2-act">** | </div>
}

# Third level menu-object, textual
temp.menu_1.3 = TMENU
temp.menu_1.3 {
    # Normal state properties
    NO.allWrap = <div class="menu1-level3-no">*** | </div>
    # Enable active state and set properties:
    ACT = 1
    ACT.allWrap = <div class="menu1-level3-act">*** | </div>
}

# ------------------------
# Menu 2 cObject - horizontal, one-level menu
# ------------------------
temp.menu_2 = HMENU
# Setting the entryLevel to be subpages to CURRENT page:
temp.menu_2.entryLevel = -1

# First level menu-object, textual
temp.menu_2.1 = TMENU
temp.menu_2.1 {
    # Normal state wrapping with alternating wrap-values (see "optionSplit")
    NO.allWrap = |*| <td>|</td> || <td class="oddcell">|</td> |*|

    # Enable active state and set properties:
    ACT = 1
    ACT.allWrap = <td class="menu2-level1-act"> | </td>
}

# ------------------------
# Path menu cObject
# ------------------------
temp.path = HMENU
# Setting the special property to "rootline" - this will produce a 
"Path-menu"
temp.path.special = rootline

# First level menu-object, textual
temp.path.1 = TMENU
# Wrapping value for the whole menu:
temp.path.1.wrap = Path: &nbsp; |
temp.path.1 {
    # Normal state properties appending " > " to all elements but the one.
    # (See "optionSplit")
    NO.allWrap = |&nbsp;&gt;&nbsp; |*||*| |
}

# ------------------------
# Main TEMPLATE cObject for the BODY
# ------------------------
temp.contentAreaTemplate = TEMPLATE
temp.contentAreaTemplate {

   template =< plugin.tx_automaketemplate_pi1

      // Modify the template selector config: This is a sub template!
   template.content.templateType = sub

   workOnSubpart = DOCUMENT_BODY
   subparts.colNormal < styles.content.get
   subparts.colLeft < styles.content.getLeft
   subparts.colRight < styles.content.getRight
}

temp.mainTemplate  = TEMPLATE
temp.mainTemplate {

    template =< plugin.tx_automaketemplate_pi1

      // Modify the template selector config: This is a main template!
    template.content.templateType = main

    workOnSubpart = DOCUMENT_BODY

    subparts.menu_1 < temp.menu_1
    subparts.menu_2 < temp.menu_2
    subparts.path < temp.path
    subparts.content < temp.contentAreaTemplate
}

# ------------------------
# Main TEMPLATE cObject for the HEAD
# ------------------------
temp.headTemplate = TEMPLATE
temp.headTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
    template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <head>-tags
    workOnSubpart = DOCUMENT_HEADER
}

# ------------------------
# Default PAGE object:
# ------------------------
page = PAGE
page.typeNum = 0

# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate

# Copying the content from TEMPLATE for <head>-section:
page.headerData.10 < temp.headTemplate

# ------------------------


	

	
		
_______________________________________________________ 
Yahoo! Acesso Grátis: Internet rápida e grátis. 
Instale o discador agora!
http://br.acesso.yahoo.com/




More information about the TYPO3-english mailing list