Coder Social home page Coder Social logo

typo3-documentation / typo3cms-reference-typoscript Goto Github PK

View Code? Open in Web Editor NEW
10.0 11.0 164.0 21.89 MB

The TypoScript Reference (TSref) is a true reference describing the core Content Objects and functions available for Template building using the TypoScript template engine.

Home Page: https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/

Makefile 100.00%
typo3-documentation typo3 typoscript reference

typo3cms-reference-typoscript's Introduction

TypoScript Reference

This document is a complete reference of all object types and properties of TypoScript as used in frontend TypoScript templates.

Furthermore, you can find a quick guide to TypoScript templates at TypoScript in 45 Minutes, insights into TYPO3 backend configuration with TypoScript in the TSconfig documentation and explanations of TypoScript syntax in the "TypoScript Syntax" chapter of TYPO3 Explained.

Repository

https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-Typoscript

Read online

https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/

typo3cms-reference-typoscript's People

Contributors

alexander-nitsche avatar astehlik avatar baschny avatar brotkrueml avatar chrissitopher avatar danielsiepmann avatar erredeco avatar franzholz avatar fsuter avatar gilbertsoft avatar jonaseberle avatar josefglatz avatar kitzberger avatar liayn avatar linawolf avatar lolli42 avatar macjohnny avatar maddy2101 avatar marble avatar mbrodala avatar ohader avatar pi-phi avatar sascha307050 avatar sebkln avatar simonschaufi avatar spoonerweb avatar susannemoog avatar sypets avatar tmotyl avatar xperseguers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typo3cms-reference-typoscript's Issues

stdWrap -> encodeForJavaScriptValue wrong description

hi, it seems there is a wrong description for stdWrap -> encodeForJavaScriptValue

The resulting string is not enclosed in quotes. If needed, quotes can be added using TypoScript.

But in \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue

/**
* Quotes a string for usage as JS parameter.
*
* @param ...
* @return string the encoded value already quoted (with single quotes),
*/

so the result is enclosed in quotes or did I get this wrong?

Bets Regards

How to use template in FLUIDTEMPLATE since TYPO3 9

This is a question:

Since TYPO3 9.5, the FILE content object is deprecated, see https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5/Deprecation-85970-FileContentObject.html

Now, documentation should get changed. FILE is still used in FLUIDTEMPLATE in template property and example:

page = PAGE
page.10 = FLUIDTEMPLATE
page.10 {
   template = FILE
   template.file = EXT:site_default/Resources/Private/Templates/MyTemplate.html

For TEMPLATE it is also used:

page.10 = TEMPLATE
page.10 {
   template = FILE
   template.file = fileadmin/template.html
}

https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/ContentObjects/Template/Index.html#template

Since FILE is deprecated (and removed), this should get changed, but how?

  • does it make sense to still have the template property at all (and not use the file property instead)?
  • how should the above code snippets look?

Related: #313

Fix includeLibs example

(This is a follow-up to #38.)

In Functions/Stdwrap/Index.rst,
https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Stdwrap/Index.html#postuserfunc
there is one line with

includeLibs.reverseString = fileadmin/example_reverseString.php

Problem is, since TYPO3 7, the property includeLibs has been removed (forge #67646) - that is the reason why the example now is no longer working.

According to the migration notes, now a hook should be used during the Frontend set up to execute custom PHP code?

How can the example be updated to be working again?

Remove or change some references to css_styled_content (9.0)

Remove configuration options language etc. that were removed with removal of pseudo site handlinge, e.g .sys_language_uid (10.0)

Also related PR:

This change removes the compatibility layer of Site Handling,
called "PseudoSite" handling.

Any TypoScript-related Language properties are removed.

  • config.sys_language_uid
  • config.sys_language_mode
  • config.sys_language_overlay
  • config.locale_all
  • config.language
  • config.typolinkEnableLinksAcrossDomains
  • typolink.useCacheHash

The hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc']
is removed.


In addition, all tests related to PseudoSite and linking
without SiteHandling are removed, linking to pages without
a site will not be linked anymore.

PR was already merged in T3explained: TYPO3-Documentation/TYPO3CMS-Reference-CoreApi#779


Adding useCacheHash to typolink triggers a
"this does not do anything anymore" deprecation message.

Further related removals (old "pageNotFound" handling
and "useCacheHash" in all viewhelpers), are removed
separately.

CSS for dl.docutils does not render like tables

I realized that the style for defenitionlists with the class .docutils do not render like "tables" (div class t3-row) for "propertys", "Data type" and "examples".
So please add this CSS to the "theme.css"

dl.docutils{
background-color: #f2ebe3;
border: 1px none #888;
border-top: 2px solid #988d81;
clear: both;
margin-bottom: 30px;
margin-top: 30px;
position:relative;
}
dl.docutils dt{
padding: 12px 8px;
color: #b34700;
font-size: 9px;
font-weight: 400;
}
dl.docutils dd{
padding: 12px 8px;
margin:0;
}

dl.docutils dt:nth-of-type(1){
font-weight: 700;
margin-right: 8px;
min-width: 30%;
margin: 0;
position:absolute;
}

dl.docutils dd:nth-of-type(1){
font-weight:700;
position:absolute;
margin-top:20px;
}

dl.docutils dt:nth-of-type(2){
border-left: 4px solid #fff;
position:relative;
left:30%;
top:0;
}
dl.docutils dd:nth-of-type(2){
border-left: 4px solid #fff;
position:relative;
left:30%;
top:0;
max-width:70%;
}
dl.docutils dt:nth-of-type(3){
border-top: 4px solid #fff;
}

Write "Introduction" for TypoScript Template Reference

Update: Rethinking this: "TypoScript in 45 minutes" has already some points I have suggested for introduction. We should review this and see if it can be integrated into the reference, or this can be linked to more prominently, or how the structure might be improved. The problem right now (in general) is that we often don't have a landing page or introduction section, it is difficult to find, etc.

Motivation

Currently, the page "Introduction" (in the TypoScript Reference) contains "About this document", "Credits", "Feedback and Fixing", Information about "Case Sensitivity" etc..

None of this is an introduction to the topic "TypoScript Templates", it is meta-information about what the reference is about, how to edit it and the "case sensitive" part is actually out of scope because that rather belongs in "TypoScript syntax"

You may argue that this is a Reference, a manual for at least intermediate audience.

But even then, this introduction could exist somewhere else. At the moment, it does not exist at all.

  • What we do have is an introduction to Templating in Getting Started, but that rather focused on Fluid, not TypoScript.
  • What we do have is "TypoScript in 45 minutes" but that is not even linked to in the TypoScript reference. Not on the start page, not in the "Introduction".

I think an introduction to this topic must not be long, it could even exist on the start page, but it should exist. It could be a summary of "TypoScript in 45 minutes" and refer to it.

Contents of Introduction

A "real" introduction could contain:

  • What are TypoScript Templates?
  • What can you do with it?
  • historical relevance: e.g. explain what used to be written in TypoScript and how this has changed, e.g. now using FLUIDTEMPLATE is possible with Fluid templates
  • explain TSFE and how TYPO3 renders frontend
  • TypoScript vs. TSconfig
  • TypoScript vs. Fluid
  • Constants & Setup
  • disambiguation: TypoScript is used for the TypoScript syntax language, TypoScript templating, constants etc. I often use the terms "TypoScript syntax language" or "TypoScript templates" to avoid using the term TypoScript for everything which makes it vague and confusing. E.g. consider the sentence: "TypoScript and TSconfig use TypoScript".

Maybe not literally included in text but things to keep in mind:

  • Imagine someone new to TYPO3 who does not know what TypoScript is or only has a vague idea
  • What are the most common usecase where you will need the TypoScript reference?

Should not contain

  • TypoScript syntax is already covered in TYPO3 Explained. The same information should not be repeated, but referred to. A short summary should be ok.
  • How to set TypoScript is already covered: file:///home/peters/prog.local/github-pull-requests/typo3-documentation/TYPO3CMS-Reference-Typoscript-sypets/Documentation-GENERATED-temp/Result/project/0.0.0/UsingSetting/Index.html

Sample text

Using existing text, I started sample text but this is unfinished!

The TypoScript Template Reference (TSref) is a reference for the core content objects, properties and functions available for template building in TYPO3 using the TypoScript template engine.

Can we merge "Objects and properties" chapter with other chapters?

It's quite hard to me to find what I'm looking for by looking at the chapters of the Typoscript Reference.
Where should I look fro PAGE object documentation?
In "Objects and properties"?
(https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/ObjectsAndProperties/Index.html)

In Content objects?
(https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/ContentObjects/Index.html)

In data types?
(https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/DataTypes/Index.html#tag)

Nop, its in "Setup" » "PAGE"

I think "Objects and properties" should be merged with other chapters

Docs > Functions > replacement

Can somone give me a hint on this? Especially the PCRE dialect for the search property bugs me. Do I need to escape characters (it looks like especially [ ] characters classes don't seem to work as expected)? I can't get a simple Regex-replacement working (which works fine when using a PCRE evaluator/debugger instead). There's no detailed information about this feature, only 5 vague lines in the TSDocs. Also the examples provided don't deal with character classes at all.

This is what I am trying to accomplish: I've got a text containing HTML markup and I want to extract the contents of some attributes without the (")-chars.

My Regular Expression looks like this: #"([^"]*)"#g
Replacement is \1 or \2 (the index of the found attribute)
Which somehow always evaluates to empty text.

Thanks in advance.

Stucture: some filenames were changed across versions - problem with version switching and backporting of changes

e.g. 9.5 and above:

Functions/Typolink.html

8.7 and below:

Functions/Typolink/Index.html

problems

While the change itself is good (it simplifies the file structure and reduces unnecessary subdirs), this causes problems:

  • it is not possible to switch between versions easily. This is only possible if the file (and URL) is the same after /version/en-us/
  • it is not possible to backport changes easily

Solution

We should analyze the effort and see if we can backport some of the file changes, at least to 8.7.

Make „cobj” „cobject” „content object” less confusing

In typoscript reference, we are using names/wording which is sound the same for the newcommers thus makes it confusing.
See:
cObject (as data type)
“cObjects” are also called “Content Objects”. See the section “Content Objects”.
https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/DataTypes/Index.html#cobject

getText->cObj (a key)
"For CONTENT and RECORDS cObjects that are returned by a select query, this returns the row number (1,2,3,…) of the current cObject record."
https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/DataTypes/Index.html#cobj

stdWrap->cObject (a key)
https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Functions/Stdwrap.html#cobject

I don't know how to solve it yet, maybe it requires just some rewording, but maybe also changes to the core should follow.
Just wanted to state my experience with training new developers.

Code examples of FILES don't work with non-default storages

The code examples mention the following snippet twice to load the current file object in TypoScript:

file.import.data = file:current:publicUrl

But that more or less only "accidentally" works and only for the default fileadmin storage.

The following snippet works across any storages:

file.import.dataWrap = {file:current:storage}:{file:current:identifier}

What context?

I try to use backend.user.isLoggedIn in my typo setup, its not working. What is meant by "The values are context related." on this page?

https://docs.typo3.org/typo3cms/TyposcriptReference/Conditions/Reference.html#variables

this works:

[getTSFE().isBackendUserLoggedIn() == true] 

[end]

this not:

 [backend.user.isLoggedIn == true]
 
 [end]

I even had a look at TYPO3 source, no luck.

context?

Add note how PAGE object about numeric keys

file: Documentation/Setup/Page/Index.rst
It would be great to add information about behaviour of the numeric keys 1,2,3,4 - e.g. that PAGE object renders them in the order, joins the output together and puts in <body> tag by default.

Readd documentation of special.targets

This is a followup of https://forge.typo3.org/issues/90481 (which will be closed in favor of this one)

This is for special = rootline only.
You can set:

special.targets {
1 = _blank
2 = _self
3 ...
}

The index stands for the rootline element.
These values are taken, if no target is defined in the page data.

I can find the description in https://docs.typo3.org/m/typo3/reference-typoscript/7.6/en-us/ContentObjects/Hmenu/Index.html but not in master anymore

Caution: I didn't check the core itself but didn't find a rst which would mention the removal

data type "array" missing?

In the 9.5 version there is a reference to :ref:data-type-array in Setup/Config/Index.rst

Both this label is missing and a description of the data type array. I would expect it to be in DataTypes/Index.rst.

Setup/Config/Index.rst

htmlTag.attributes
==================

.. container:: table-row

   Property
         htmlTag.attributes

   Data type
         :ref:`data-type-array`

Restructure section of DataProcessor in FLUIDTEMPLATE

Issue:
Whenever I want to search and e.g. set a link to one of the DataProcessor examples, it's only possible to link to the general DataProcessor section.

Solution:
Either set headers to be possible to link to each DataProcessor or create a complete new page where it's possible to get a better and linkable overview of each DataProcessor.

What do you think?

Find better explanation for FLUIDTEMPLATE

FLUIDTEMPLATE
The TypoScript object FLUIDTEMPLATE works in a similar way to the regular “marker”-based TEMPLATE object. However, it does not use markers or subparts, but allows Fluid-style variables with curly braces.

https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/ContentObjects/Fluidtemplate/Index.html

This is not helpful for beginners to TYPO3.

  • What is it?
  • What can you do with it?

While most of this may be self-explanatory from seeing the example, one or 2 sentences in the beginning would be useful. Or even more, if it serves the purpose.

Resources:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.