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 7807859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:59:20+00:00 2026-06-02T02:59:20+00:00

I made a custom marker for tt_news which shows the first image from the

  • 0

I made a custom marker for tt_news which shows the first image from the media field, OR the third if it belongs to certain category (lets say category with ID = 2). I dont know how to make that conditional. This is what I have so far:

    10 = IMAGE
    10.file{
        width = 550
        height = 350
        import = uploads/pics/
        import{
            field = image
            listNum = 0

            #If also belongs to the category "Startseite", the listNum should be 2
            listNum.stdWrap.override = TEXT
            listNum.stdWrap.override{
                value = 0
                if{
                    #??????
                }
            }
        }
    }
  • 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-06-02T02:59:22+00:00Added an answer on June 2, 2026 at 2:59 am

    You need to write custom condition as described in doc in userFunc section (bottom)

    http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.3.2/view/1/4/

    News and categories are connected with MM relation so you just to check if MM table contains this pair…

    typo3conf/localconf.php:

    function user_newsInCategory($catUid) {
        $ttNewsGet = (t3lib_div::_GP('tx_ttnews'));
        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
            'uid_foreign',
            'tt_news_cat_mm',
            'uid_foreign = ' . $catUid . ' AND uid_local=' . intval($ttNewsGet['tt_news'])
        );
        return ($GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0) ? true : false;
    } 
    

    somwhere in TS after your 10 = IMAGE { ... } block:

    [userFunc = user_newsInCategory(2)]
        10.file.import.listNum = 2
    [end]
    

    edit:

    As you can see in the sample it works only if news is displayed (ie. if param &tx_ttnews[tt_news] exists in URL)

    To check similar check per each list item you need to use custom marker via hook (as described in tt_news manual) by using extraItemMarkerProcessor – then you can use similar condition per each $row to display different images.

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

Sidebar

Related Questions

I made a custom master page. I also made a custom CSS file, which
I made a custom handler that derives from MvcHandler. I have my routes using
I had made custom example by taking reference from here Example is working fine
Using Drupal on a project which I made custom node types in using the
I have UIPageControl which I have made custom its dot color is not changing
I have made one custom user control (search text box), which basically consists of
I have made a resizeable custom overlay with an image and it works, you
I've made custom adapter and call notifyDataSetChanged() then data updates. But after call notifyDataSetChanged()
Made a custom obj called Item with some string fields and one float. .h
I made a custom listview following the tutorial in this link http://www.coderzheaven.com/2012/03/23/how-to-create-a-custom-listbox-in-windows-phone-7/ and 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.