|  | Форум больше не используется. Присоединяйтесь к каналу #community-ru в Slack for TYPO3 community | 
|  28.09.2009, 16:35 | #1 | 
| Продвинутый |  Typoscript parameter condition cache 
			
			Здравствуйте уважаемое typo3 сообщество! Пытаюсь сделать простую вещь из tt_content, чтобы можно было смотреть полный текст статьи... Так вот, страница с разными парпаметрами full походу кэшируется как одна страница!! Соответственно надо каждый раз чистить кэш, чтобы увидеть полный текст статьи. Насколько я знаю, если get параметер используется как TS condition, то страница с разным параметрами должны кэшироваться отдельно... Какой-то бред! Помогите, если можете, очень прошу! Дмитрий. Код: [globalVar = GP:full > 0]
   tt_content.text.21 = TEXT
   tt_content.text.21 {
      field = tx_nordway_full
      required = 1
      parseFunc = < lib.parseFunc_RTE
      editIcons = tt_content:bodytext, rte_enabled
      editIcons.beforeLastTag = 1
      editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.bodytext
      prefixComment = 2 | Text:
   }
   
   tt_content.textpic.21 < tt_content.text.21
   tt_content.text.22 = TEXT
   tt_content.text.22.value = <-Назад
   tt_content.text.22.typolink{
      parameter.data = page:uid
   }
   tt_content.textpic.22 < tt_content.text.22
lib.content.get_full = CONTENT
lib.content.get_full {
   table = tt_content
   select.orderBy = sorting
   #select.where = colPos=1
   select.languageField = sys_language_uid
   select.andWhere = uid={GPvar:full} 
   select.andWhere.insertData=1
}
styles.content.getLeft.select.andWhere>
styles.content.getLeft.select.andWhere = uid<>{GPvar:full} 
styles.content.getLeft.select.andWhere.insertData=1   
page.10.marks.content.menu_left>
page.10.marks.content.menu_left < styles.content.getLeft
page.10.marks.content>
page.10.marks.content < lib.content.get_full
[end] | 
|   |   | 
|  28.09.2009, 17:31 | #2 | 
| Senior Member |   
			
			Почитайте http://typo3.org/development/article...ries-of-chash/ что бы понять почему так происходит. В двух словах - TYPO3 не знает что за параметр такой full и поэтому не учитывает его при кэшировании страниц. | 
|   |   | 
|  28.09.2009, 18:01 | #3 | 
| Продвинутый |   
			
			Спасибо! Вот цитата из того же документа: Код: Another non-GET variable factor in caching is conditions in the TypoScript template. When you are using conditions in the TypoScript templates the relation between available conditions and matching conditions will also be a part of the caching ID. This means that if you make a condition in TypoScript to output different code for a specific web browser that will create at least two pages in the cache table; one for the specific browser and one for all others. Может быть я что-то недопонял? Тогда как мне заставить мой код работать? Дмитрий. | 
|   |   | 
|  28.09.2009, 18:26 | #4 | 
| Senior Member |   
			
			Да это я не учел. Но ваша цитата не противоречит вашему результату. Условие GP:full > 0 при разных full больших нуля будет одно и тоже. По идее вам нужно генерировать ссылки с парметром full там где на них идет ссылка с помощью typolink, тогда добавится cHash и будет кэшироваться нужный контент. | 
|   |   | 
|  29.09.2009, 13:33 | #5 | |
| Продвинутый |   Цитата: 
 Исправил так: Код: 	text.21 = TEXT
	text.21.value = Читать далее...
	text.21.fieldRequired = tx_nordway_full
	text.21.typolink{
		additionalParams=&full={field:uid}
		additionalParams.insertData = 1
		parameter.data = page:uid
		useCacheHash = 1
	}edit: Все заработало!! Я просто не там поправил. Спасибо большое! Дмитрий. Последний раз редактировалось dimaip; 29.09.2009 в 13:44 Причина: ошибъся... | |
|   |   | 
|  | 
| Теги | 
| cache, conditions, typoscript | 
| 
 | 
 | 
|  Похожие темы | ||||
| Тема | Автор | Раздел | Ответов | Последнее сообщение | 
| Включить TypoScript, выключить TypoScript. | thebat | TypoScript практикум | 4 | 28.04.2007 15:05 | 
| Зачем нужен TypoScript | MVH | Общие вопросы | 17 | 14.04.2005 22:36 | 
| Clear cache at particular time | Gleb | Общие вопросы | 1 | 18.02.2005 14:43 |