Форум больше не используется. Присоединяйтесь к каналу #community-ru в Slack for TYPO3 community |
|
29.07.2006, 20:39 | #1 |
Новенький
|
How to get grab content from certain id+column?
Kak mozhno vziat content so stranizi i assing it to a some value to output it into template?
Est naprimer straniza s id 223. Nado vziat s nee colonky 0(normal), s language id 2, i assing it to temp.langbar please help or suggest syntax/keywords to explore |
29.07.2006, 21:06 | #2 |
Новенький
|
Chto zdes ne tak? Ya prosto pitaius vziat content s id 223, default language, i column 0. tam stoit plugin na languages. potom pipe it to template.
#typoscrpt setup temp.langMenu = CONTENT temp.langMenu { select { pidInList = 233 # uid of the page languageField=sys_language_uid where=colPos=0 } table = tt_content } A vot polnostiu ves moi setup - Код:
config.linkVars = L config.sys_language_uid = 0 config.language = en config.locale_all = en_EN [globalVar = GP:L = 0] config.sys_language_uid = 0 config.language = en config.locale_all = en_EN [global] [globalVar = GP:L = 2] config.sys_language_uid = 2 config.language = ua config.locale_all = ua_UA [GLOBAL] config.tx_realurl_enable = 1 config.baseURL = http://www.ukrainiantoronto.com/ plugin.tx_automaketemplate_pi1 { content = FILE content.file = fileadmin/templates/uktor.html elements { BODY.all = 1 BODY.all.subpartMarker = DOCUMENT_BODY HEAD.all = 1 HEAD.all.subpartMarker = DOCUMENT_HEADER HEAD.rmTagSections = title DIV.all = 1 } } temp.footer=TEXT temp.footer.value= Copyright © 2006 <a href="http://www.kilsol.com/">KilSol</a>. All rights reserved. <a href="http://www.ukrainiantoronto.com/index.php?id=99">Terms of Use</a> | <a href="http://www.ukrainiantoronto.com/index.php?id=98">Privacy Policy</a> temp.langMenu = CONTENT temp.langMenu { select { pidInList = 233 # uid of the page languageField=sys_language_uid where=colPos=0 } table = tt_content } temp.menu_1 = HMENU temp.menu_1.1 = TMENU temp.menu_1.1 { NO.allWrap = <div class="menu1-level1-no"> | </div> ACT = 1 ACT.allWrap = <div class="menu1-level1-act"> | </div> } temp.menu_1.2 = TMENU temp.menu_1.2 { NO.allWrap = <div class="menu1-level2-no"> | </div> ACT = 1 ACT.allWrap = <div class="menu1-level2-act"> | </div> } temp.mainTemplate = TEMPLATE temp.mainTemplate { template =< plugin.tx_automaketemplate_pi1 workOnSubpart = DOCUMENT_BODY subparts.menu_1 < temp.menu_1 subparts.langMenu < temp.langMenu subparts.footer < temp.footer subparts.content_left < plugin.tx_kbcontslide_pi1 subparts.content_left.content.select.where = colPos=1 subparts.content_right < plugin.tx_kbcontslide_pi1 subparts.content_right.content.select.where = colPos=2 subparts.border < plugin.tx_kbcontslide_pi1 subparts.border.content.select.where = colPos=3 subparts.content = COA subparts.content { CONTENT { select.where = colPos = 1 select.languageField = sys_language_uid } 10 = CONTENT 10 < styles.content.get } } temp.headTemplate = TEMPLATE temp.headTemplate { template =< plugin.tx_automaketemplate_pi1 workOnSubpart = DOCUMENT_HEADER } page = PAGE page.config.index_enable = 1 page.typeNum = 0 page.10 < temp.mainTemplate page.headerData.10 < temp.headTemplate |
30.07.2006, 02:08 | #3 |
TYPO3 Infected
|
Код:
temp.langMenu = RECORDS temp.langMenu.source = 233 temp.langMenu.tables = tt_content |
30.07.2006, 06:12 | #4 |
Новенький
|
Ne rabotaet
Mozhet ya ne tak ego vstavliaiu v setup(langmenu) Код:
config.linkVars = L config.sys_language_uid = 0 config.language = en config.locale_all = en_EN [globalVar = GP:L = 0] config.sys_language_uid = 0 config.language = en config.locale_all = en_EN [global] [globalVar = GP:L = 2] config.sys_language_uid = 2 config.language = ua config.locale_all = ua_UA [GLOBAL] plugin.tx_automaketemplate_pi1 { content = FILE content.file = fileadmin/templates/uktor.html elements { BODY.all = 1 BODY.all.subpartMarker = DOCUMENT_BODY HEAD.all = 1 HEAD.all.subpartMarker = DOCUMENT_HEADER HEAD.rmTagSections = title DIV.all = 1 } } temp.menu_1 = HMENU temp.menu_1.1 = TMENU temp.menu_1.1 { NO.allWrap = <div class="menu1-level1-no"> | </div> ACT = 1 ACT.allWrap = <div class="menu1-level1-act"> | </div> } temp.menu_1.2 = TMENU temp.menu_1.2 { NO.allWrap = <div class="menu1-level2-no"> | </div> ACT = 1 ACT.allWrap = <div class="menu1-level2-act"> | </div> } temp.mainTemplate = TEMPLATE temp.mainTemplate { template =< plugin.tx_automaketemplate_pi1 workOnSubpart = DOCUMENT_BODY subparts.menu_1 < temp.menu_1 subparts.TOPNAV = HMENU subparts.TOPNAV.special = list subparts.TOPNAV.special.value = 9,8,6,5,3,19,212,39 subparts.TOPNAV.1 = TMENU subparts.TOPNAV.1 { NO.allWrap = |*| <span class="topnav"> | |</span> |*| ACT = 1 ACT.allWrap = |*| <span class="topnav"> | | </span> |*| } temp.langMenu = RECORDS temp.langMenu.tables = tt_content temp.langMenu.source = 223 subparts.langMenu < temp.langMenu subparts.content_left < plugin.tx_kbcontslide_pi1 subparts.content_left.content.select.where = colPos=1 subparts.content_right < plugin.tx_kbcontslide_pi1 subparts.content_right.content.select.where = colPos=2 subparts.border < plugin.tx_kbcontslide_pi1 subparts.border.content.select.where = colPos=3 subparts.content = COA subparts.content { CONTENT { select.where = colPos = 1 select.languageField = sys_language_uid } 10 = CONTENT 10 < styles.content.get } } temp.headTemplate = TEMPLATE temp.headTemplate { template =< plugin.tx_automaketemplate_pi1 workOnSubpart = DOCUMENT_HEADER } page = PAGE page.typeNum = 0 page.10 < temp.mainTemplate page.headerData.10 < temp.headTemplate Код:
<div id="langMenu"> </div> Последний раз редактировалось datentod; 30.07.2006 в 06:21 |
30.07.2006, 17:42 | #5 |
Новенький
|
In case anyone will stumble upon the same problem here is the solution
temp.whatever = CONTENT temp.whatever { table = tt_content select { pidInList = HERE_GOES_PID_OF_PAGE orderBy = sorting andWhere = colPos=0 } } |
30.07.2006, 21:16 | #6 |
TYPO3 Infected
|
<div id="langMenu">
<!--###langMenu### start--> Some text <!--###langMenu### end--> </div> Примерно так должен выгядеть кусок кода, куда вы хотите вставить ваше языковое меню. |
31.07.2006, 04:22 | #7 |
Новенький
|
A zachem <!--###langMenu### start--> ?
U menia prosto s <div id="langMenu"> rabotaet. Tolko kogda ne rabotet v outpute vidaet <!--###langMenu### start--> Ya videl na drugih saitah tozhe pishut <!--###someitme### start-->.. Tak vkakih slychiah nado isplozivat <!--###someitme### start-->? |
31.07.2006, 12:59 | #8 | |
TYPO3 Infected
|
Цитата:
|
|
31.07.2006, 14:25 | #9 |
Новенький
|
Since I am new to typo3 snachalo nado razobratsa s basics, a potom migrate to WYSWIG if needed
|