Menu
  • HOME
  • TAGS

Typoscript Breadcrumb - special.range parameter

typo3,typoscript

From docs: If the value is < 0, entryLevel is chosen from "behind" in the rootLine. Thus "-1" is a menu with items from the outermost level, "-2" is the level before the outermost... In rootline menu that means the -1 level is current page, -2 one level above current,...

Display category and its content in TYPO3

typo3,typoscript,typo3-6.2.x

There is no out-of-the box solution for this. But you can use the following : Or create your own extension where you gather the categories of your page and render them on your page. You then can also create a sort of category menu. You can use category collection :...

TYPO3 4.5 - Multilingual - How can I use the second Language as default?

typo3,translation,default,typoscript

the solution for your problem is the attribute sys_language_mode You can define the fallback for each language. For example in your case [globalVar = GP:L2] config { sys_language_uid = 2 language = es locale_all = es_ES.UTF-8 htmlTag_langKey = es sys_language_mode = content_fallback;1,0 } [global] This setup the content_fallback followed by...

TYPO3 special menu “browse”

menu,typo3,typoscript

You need to remove the special.value to always take the current pid. It could look something like this (slightly different, but copied from a live project): lib.navi.horizontal = COA lib.navi.horizontal { 10 = HMENU 10 { special = browse special { items = prev } 1 = TMENU 1.noBlur =...

TYPO3: Pass current menu page uid as parameter to userFunc

function,menu,parameters,user,typoscript

I could access the page ID directly in the user function: TypoScript: typolink.userFunc = user_mcfazabosOnCurrentPage->main PHP: $pageId = $this->cObj->getFieldVal( 'uid' ); ...

Language detection not working in Typo3 6.2.12

typo3,typoscript,typo3-6.2.x,language-detection

I've added the following configuration; plugin.tx_rlmplanguagedetection_pi1 { useOneTreeMethod = 1 defaultLang = de limitToLanguages = de,en } page.987 =< plugin.tx_rlmplanguagedetection_pi1 I understood that the functionality is not working only with this configuration. We need to "Select Official Language (ISO code):" in the website langauge ( alternate language we added in...

typoscript lib set variable for controller

typo3,typoscript

I did not know the answer, but another smart person did: http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2011-October/010591.html learned something myself...

Typo3 - TMENU get Content from Colpos

typo3,typoscript

Here is my Solution lib.mainmenu = HMENU lib.mainmenu { 1 = TMENU 1 { wrap = <ul id="mainmenu">|</ul> expAll = 1 NO { wrapItemAndSub = <li>|</div></li> ATagParams = class="drop" } submenuObjSuffixes = a || b || c || d || e } 2a < .1 2a { wrap = <div...

How to get page categories in Typoscript (and use with tx_news)

typo3,typoscript,tx-news

Here's a solution that works in my setup. The editor chooses categories for the page, and gets all news items that belong to the category. temp.categoryUid = CONTENT temp.categoryUid { table = pages select { // dontCheckPid doesn't exist for CONTENT objects, so make it recursive from root page (or...

How to use FAL in TypoScript with level sliding features?

typo3,typoscript

uploads/media is a relict from the time resources were copied into that folder. Therefore prepending your resource with it is wrong. "2101" is the ID of the file reference you got from the Media field. You need to resolve this reference to your actual file: temp.header-image = IMG_RESOURCE temp.header-image {...

How to use typoscript object in fluid template as if condition

typo3,typoscript,fluid,typo3-6.2.x

You can use the ViewHelper f:cObject. It would look like this: <f:for each="{newsItem.categories}" as="category"> <f:if condition="{category.uid} == {f:cObject(typoscriptObjectPath: 'lib.myid')}"> Category ID is the same as myid </f:if> </f:for> Alternatively, you can make the value a setting of the news plugin, by setting plugin.tx_news { settings { valuefromlibrary < lib.myid }...

Typoscript HMENU drop down is not working,
  • -Tag closes to early
  • drop-down-menu,typo3,typoscript

    Only a partial answer, for the problem with the first menu level: You are using allWrap to add the <li> tag, which only wraps the menu item, but not the submenu. Use wrapItemAndSub instead, as you did on the second menu level. Link to documentation. Also, some indentions in the...

    Typo3 Rich Snippets with typoscript

    typo3,typoscript,typo3-6.2.x,rich-snippets,google-rich-snippets

    This worked out for me. config.htmlTag_stdWrap { setContentToCurrent = 1 cObject = COA cObject { 1 = TEXT 1.value = itemscope 1.noTrimWrap = | | | 2 = TEXT 2.value = itemtype="http://schema.org/Organization" 2.noTrimWrap = | | | 3 = TEXT 3.value = lang="en" wrap = <html | > } }...

    Remove default html header with typoscript

    typo3,typoscript

    On the rewritten question: how to remove the page title tag. config.noPageTitle = 2 This is an age-old extravaganza of TypoScript: https://forge.typo3.org/issues/14929...

    Do not wrap grid_elements content object, OR, only wrap children of grid_elements in Typo3

    typo3,typoscript

    i am not sure, but i think this is what you are looking for. # the grid element uid 1 < lib.gridelements.defaultGridSetup 1 { columns { # colPos ID 10 < .default 10.wrap = <div class="row">|</div> # this adds the value "module" as class and wraps a content element #...

    Get String of n:1 Domain Model Object

    typo3,typoscript,extbase,typo3-6.2.x,typo3-6.1.x

    If sex is your model that has the property sex (type string) you can use {person.sex.sex} in TYPO3 Fluid. An alternative approach is to adjust the getter method Person.getSex() in your model person so that it returns the property sex from the model sex: getSex() { return $this->sex->getSex(); } Having...

    typo3 templavoila check current language

    typo3,typoscript,templavoila

    Using translation labels in TypoScript You can use a translation label in TypoScript. For example: {LLL:typo3conf/customlabels.xlf:label.id} {LLL:EXT:mytemplateext/Resources/Private/Language/locallang.xlf:label.id} You may want to look at: http://docs.typo3.org/typo3cms/FrontendLocalizationGuide/BasicSetupOfALocalizedWebsite/Llxml%28locallang-xml%29InPluginsAndTyposcript/Index.html llXML files are XML files containing labels that the system can fetch in a localized version if a language pack is installed. If you want to...

    TYPO3 getting image from page content

    image,get,content-management-system,typo3,typoscript

    Maybe I don't understood correctly, but... you don't need to write it yourself, just in your main TS template include CSS Styled Content from extension, so you can render whole column like: page.20 < styles.content.get If you need to change some wrappings (i.e.: to add your news CSS classes) you...

    Hide typo3 content elements for specific user(groups)

    typo3,typoscript

    Note: I have only an old Typo3 4.3.5 installation, but I hope this hasn't changed much. In User admin, edit group permissions and go to Access lists. At the bottom is "Explicitly allow/deny field values" where you can restrict specific content types. With the restriction, affected users still see the...

    typoscript append keywords from tt_products

    typoscript

    You can use a COA instead of RECORDS inside page.meta.keywords.stdWrap.append. Thus you can add easliy whatever you want. If page.meta.keywords was defined previously you need to use stdWrap.append or stdWrap.prepend to append or prepend anything. page.meta.keywords.stdWrap.append = COA page.meta.keywords.stdWrap.append { 10 = TEXT 10 { value = My page is...

    uid of parent page or pid of current page for Typoscript db queries

    typo3,typoscript

    I have a workaround that i will use for now (untill i have a better grasp on how to typoscript). I just broke the query condition with a marker: lib.dbValues = CONTENT lib.dbValues { table = pages select { selectFields = uid #pidInList = pid where = pid NOT IN...

    Typoscript issue with GP vars?

    typo3,typoscript,typo3-6.2.x

    You code is insecure! Don't use it on production. What you should do instead - is to use TS query markers, which uses prepared statements in a background. lib.products = CONTENT lib.products { table = TABLE select { pidInList = 26506 orderBy = name where = sid like '###sid###' markers...

    TYPO3: Dynamically redirect to parent page with typoscript

    redirect,typo3,typoscript,http-redirect,typo3-6.2.x

    The data type of config.additionalHeaders is string so trying to access the DB or working with constants inside config.additionalHeaders can't work, unfortunately.

    How To configure Language menu in Typo3 CMS

    php,typo3,typoscript

    # Language Menu lib.lang_menu = COA lib.lang_menu { 10 = HMENU 10 { special = language special.value = 0,1 1 = TMENU 1 { expAll = 0 wrap = <div class="lang"><span aria-hidden="true" class="glyphicon glyphicon-globe"></span><div class="btn-group"><button class="btn btn-default btn-xs dropdown-toggle language_menu" type="button" data-toggle="dropdown" aria-expanded="false">DE <span class="caret"></span></button><ul class="dropdown-menu" role="menu">|</ul></div></div> wrap =...

    userfunc condition for detecting mobile device

    typo3,typoscript,typo3-7.x

    You can accomplish this with TypoScript using the PAGE Object. The code below shows you how to execute your own code before executing something else (like the template engine/content rendering etcetera). page.01 = USER_INT page.01 { userFunc = TYPO3\MyExt\Utility\MobileDeviceUtility->detectMobileDevice } And in code: <?php namespace TYPO3\MyExt\Utility; class MobileDeviceUtility { /**...

    With TYPO3 be_layout, how to choose frontend template correctly (performance-wise)?

    typo3,typoscript,typo3-6.2.x

    The CASE object doesn't "misbehave" like the "if" condition in stdWrap. Here's the solution that works for me from http://forum.typo3.org/index.php?t=tree&th=207295&goto=723619&#msg_723619: apply the CASE one level upwards: page.10 = CASE page.10 { key.data = levelfield:-1,backend_layout_next_level,slide key.override.field = backend_layout default = TEMPLATE default { template = FILE template.file = fileadmin/templates/main/tmpl/main.html marks {...

    Typo3 - what is the usage of t3lib_div::getUserObj()

    php,typo3,typoscript

    According to the TYPO3 CMS API getUserObj() creates a reference to a user defined object. In your case, it should return a reference to a tx_ttproducts_basket object, which has been previously instantiated in your code. As getUserObj() should return a reference to an object ($basket), you should be able to...

    TYPO3: How to create a Dropdown in own Extension

    typo3,typoscript

    Like you can see my and derhansen small discussion the problem is in your collection. If you will pass in collection: Red, Blue, Blue, Blue, Yellow, Yellow then your loop will display every position from collection. The same thing will be with select viewhelper The thing you should is to...

    Typo3 extension builder configuration settings.yaml

    typo3,typoscript,fluid

    You comment out the statement. use Edit.html: keep instead of #Edit.html: keep ...

    How to disable cache for a image carousel in TYPO3

    caching,typo3,typoscript,extbase,typo3-6.2.x

    in your ext_localconf.php there, where you added your plugin make an usage of the 4-th param of configurePlugin method \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( 'Vendor.' . $_EXTKEY, 'PluginName', array('Customers' => 'slider',), array('Customers' => 'slider',) // List non-cachable action(s) ); Of course fix the VendorName and PluginName to your own. It will cause that plugin's...

    In a Typoscript HMENU, how to force the language for the URL

    typo3,typoscript,realurl,typo3-4.5

    This is an obvious example of "get desperate and look for hacks instead of looking at the problem after a good night's sleep". There were inconsistencies in the RealURL Config which provoked the erroneous behaviour. I'm posting the hopefully fully working RealURL config. It covers two single-domain/multi-language websites as well...

    How to put dynamic content from database in TYPO3 custom template?

    typo3,typoscript,typo3-7.x

    You are nearly correct. You just need to specify the colPos from the Backend Layout of the content you want to assign to a subpart in your TypoScrip: page.10.subparts { ... PRODUCTLEFT < styles.content.get PRODUCTLEFT.select.where = colPos=3 ... } styles.content.get styles.content.getLeft and styles.content.getRight are just preconfigured for the default colPos...

    Typo3 BootStrap 3 navbar (typoscript)

    twitter-bootstrap-3,typo3,navbar,typoscript

    Biesior, thanks for pipe suggestions, it did set me in the right direction. After a load of research and hacking (not being a coder and alien to typoscript), I managed to get the bootstrap 3 inverse navbar working correctly with in typo3. The following code works out of the box....

    How can I create a link to a specific, known page using TypoScript?

    typo3,typoscript

    When you leave out the "value" the page title is set automatically: stdWrap.prepend = TEXT stdWrap.prepend.typolink.parameter = {$HOME_SHORTCUT} ...

    Apply additional TypoScript template to root page only

    templates,typo3,typoscript,typo3-6.1.x

    Create templates records (let's say main and subpages) NOT in the root page but for an example in sys folder. On main page create additional template, include main and at Options tab set subpages in Template on next level field. ...

    remove /?no_cache=1 in URL using Typo3 6.2 and RealURL extension [closed]

    typoscript,typo3-6.2.x,realurl

    Don't use the no_cache option instead run the extension as USER_INT. With tt_news this should work: plugin.tt_news = USER_INT With your custom extension you have got full control about USER vs. USER_INT anyway....

    The page is not configured! [type= 0][]

    typo3,typoscript,typo3-4.5

    Apparently TYPO3 can't find TypoScript use Web > Template tool and check if record exists, also if it includes TS from external files, make sure the files exists.

    TYPO3 TypoScript: Display a list of subpages with content on parent page

    typo3,archive,typoscript

    Seems like I figured it out myself, all I had to do was call for content in a separate query. For those that are looking to achieve something similar, here is the code I used to help you out. lib.portfoliolist = CONTENT lib.portfoliolist.table = pages lib.portfoliolist.select { orderBy = sorting...

    Typo3 getting image path with CONTENT

    typo3,typoscript,typo3-6.1.x,typo3-6.2.x

    Instead of using a content element on a hidden page you can use the "Resources" tab of a page, where you can upload files (in your case images). Usually you use the page on the top level of your TYPO3 pagetree for this, so you can inherit selected images to...

    Typo3 backend not multilanguest

    typo3,typoscript,typo3-6.2.x

    In Order to be able to translate content in the backend into e.g. english you need to Go to your Root page (ID=0), select the list module and create a 'Website Language' Record 'english'. Go to the page you want to translate and create a record called 'Alternative Page Language'....

    TYPO3 6.2/TypoScript: add CSS class to figure tag if caption is not empty

    typo3,typoscript,typo3-6.2.x

    Try with if.isTrue.data = register:allImageCaptions to render the captions. Because FAL data might come from many sources, it is put in a register for each image instead of providing the database rows like in previous releases. To see all registers, use stdWrap.outerWrap.cObject = TEXT stdWrap.outerWrap.data = debug:register ...

    Change TypoScript for one record

    typo3,typoscript

    Use a CONTENT content object instead of a RECORDS content object, and then use the renderObj property to render your content element. lib.footer_video_content = CONTENT lib.footer_video_content { table = tt_content select { uidInList = 11 pidInList = <Page ID where the content element is> languageField = sys_language_uid # Add more...

    Typoscript CASE & default value

    typo3,typoscript

    Use default.data = field:pid instead of default.data = pid. TYPO3 needs to know where to look for pid, it could be a request parameter, register, configuration setting and so on as well.

    typoscript condition on get parameter

    parameters,get,condition,typoscript

    It looks like it's impossible for included files: https://forge.typo3.org/issues/29583...

    Typoscript add class to the first element using stdWrap

    typo3,typoscript,typo3-6.2.x

    Your original TS is fine. Supposing you have the images in the same CE (Content element), not in several CEs. As such: For easier readability, I have modified the following line: stdWrap.wrap = <div class="item active">A|ENDA</div>|*|<div class="item">B|ENDB</div>|*|<div class="item">C|ENDC</div> Which gives me: <div id="c1531" class="csc-default"> <div id="carousel-example-generic" data-ride="carousel" class="carousel slide carousel-fade">...

    TYPO3 6.2 scaling img using gifbuilder did't work

    imagemagick,typo3,typoscript,yag

    Probably this issue was posted on forge https://forge.typo3.org/issues/65378. If so, I think you should add your comments to the this thread. This will speed up reaction of TYPO3 team....

    TYPO3 - How to pack a new TYPO3 extension as .t3x file

    php,typo3,typoscript

    TBH I'm not sure if it's possible at all. On the other hand, you don't need to pack extension to t3x as TYPO3 (at least in version 6+) handles .zip files as well in the Extension Manager (EM). Just go to EM, find the ext and click on Download as...

    TYPO3 Neos - Access Media Management files through TypoScript?

    typo3,typoscript,typo3-flow,typo3-neos,typoscript2

    It is currently (state of Neos 1.2 beta) not possible to gather a list of assets with the built-in TypoScript objects / Eel helpers. There are two ways to implement your requirement: Create a plugin that renders the list of PDFs Create a new TypoScript object or Eel helper to...

    TYPO3 Solr extension and facets

    solr,typo3,typoscript,typo3-6.2.x

    I assume that your type-field in the solr index only has 4 values, one for pages, 1 each for the two custom tables, and 1 for news. In order to get 6 facets, you need to have 6 different values in the field the faceting is done on. I'm not...

    TYPO3 ver. 6.2.2 Bootstrap 3 News - TOP3 and pagination

    twitter-bootstrap,typo3,typoscript

    glad you like it. 1. This is currently just an example how you could display news without any extension in typo3 but feel free to make an Feature request in the repository of the package. https://github.com/benjaminkott/bootstrap_package/issues?state=open 2. The default setting of the package is 5 so it will display the...

    TYPO3 / RealURL force GET Parameter for every link

    typo3,typoscript,realurl,typolink

    I think you are searching for the config.linkVars option. To set a default for the parameter, you can use config.defaultGetVars, or let RealURL do it.

    Multiple Images in TemplaVoila Template, Typo3 6+

    image,typo3,typoscript,templavoila

    cObj HTML is deprecated: TYPO3 lib HTML and TEXT code So simply change your code to: 10 = COA 10 { 10 = TEXT 10 { value.field = field_carousel value.split { token = , cObjNum = 1 1 { 10 = IMAGE 10 { file { import.current = 1 import...

    Typoscript USER / USER_INT objects in powermail input fields

    typoscript,fluid,extbase,typo3-6.2.x

    I'm just starting out with Typo3 myself, but I needed that functionality also. I had the same problem, it started working for me when I used this: plugin.tx_powermail.settings.setup.prefill { company = USER company { userFunc = tx_extbase_core_bootstrap->run extensionName = ExtPowermail pluginName = Extpowermail vendorName = TYPO3 switchableControllerActions.Extpowermail.1 = list }...

    Typo3 Neos: How to pass parameter from typoscript using 'TYPO3.Neos:Plugin'?

    typo3,typoscript,typo3-flow,typo3-neos

    The arguments from the TypoScript plugin object is available as internal arguments on the request, which is available in the controller action. /** @var \TYPO3\TYPO3CR\Domain\Model\Node $currentNode */ $currentNode = $this->request->getInternalArgument('__node'); A few additional tips can be found here...