Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5951151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:29:45+00:00 2026-05-22T17:29:45+00:00

I want to output a string to the rendered HTML by using two fallbacks.

  • 0

I want to output a string to the rendered HTML by using two fallbacks.

My typoscript is defined at the top level page (root page of my website) and is passed to all pages at lower levels.

Structure:

  • Homepage
    • Page at level 1
      • Page at level 2

Regular output of the file:

The string comes from a TemplaVoila field (Page / Edit / Extended / MyField): field_copyright_name

To output it to the desired point in the HTML output a templaVoila mapping exists (Type: Typoscript Object Path), named: lib.copyright_name

The following typoscript does the job:

lib.hint_copyright_name = COA
lib.hint_copyright_name.10 = TEXT
lib.hint_copyright_name.10 {
    setCurrent.dataWrap = {field:field_copyright_name}
    current = 1
}

This works for all pages at all levels where the field (in page properties) is not empty.

The first fallback:

If the field is empty (in properties of that page, e.g. at level 2) typoscript should get the value from the pages above (at level 1, and if it is empty too, it should get it from homepage). No clue how to do it. Can you help?

The second fallback

If the first fallback still returns an empty string (because the field was empty at all levels) it should do a fallback to a default value “Copyright by me”.

To enable this fallback without “first fallback” is easy:

switchdefault_copyright_name = TEXT
switchdefault_copyright_name {
    setCurrent.dataWrap = {field:field_copyright_name}
    current = 1
    override = "Copyright by me"
    override.if.isFalse.field = field_copyright_name
}


lib.hint_copyright_name = COA
lib.hint_copyright_name.10 < switchdefault_copyright_name

But how to integrate the “first fallback”?

EDIT:

I tried:

setCurrent.data = {levelfield:-1, field_copyright_name, slide}

or

setCurrent.data = levelfield:-1, field_copyright_name, slide

or

setCurrent.dataWrap = {levelfield:-1, field_copyright_name, slide}

or

setCurrent.dataWrap = levelfield:-1, field_copyright_name, slide

but without success – no output.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:29:46+00:00Added an answer on May 22, 2026 at 5:29 pm

    Just found this : http://lists.typo3.org/pipermail/typo3-english/2006-October/032764.html

    It’s supposed to make youre slide thing to work.
    Just set : Installation > all configuration > addRootLineFields

    Didn’t tried it, but seems like the solution

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to output the following string in PHP: ä ö ü ß €
I want to output top 10 lines of AWK command in the list of
HI, I want to dynamically concatenating the strings using C#. I have localized string
I want to output a string that welcomes a user to the application. I
I want to capture output of a Perl program and display output data (string
I want to compress/transform a string as new string. i.e.: input string: USERNAME/REGISTERID output
I want to format an output string with a series of variables. When I
I want to literally output, with echo, html tags. First the code was like
Typically when you want to mark string output as safe in Jinja2 you do
I have a string some thing like my+*%name===is+jhon!#and&*^I$stay===in^&$#@US . I want output as s[0]=my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.