Results 1 to 5 of 5

Thread: carousel 'cross card' tpl?

  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    448

    Default carousel 'cross card' tpl?

    Hi all;
    I need to display some weekly stats. the stats are loaded via Json and return something like:
    {
    {day: sun, stat: xxx},
    {day: mon, stat: yyy}
    ...
    } (exact format is not important for my question...)

    I want to use a carousel such that each card holds a different day. is it possible to have a TPL in the carousel to achieve this? (i am having trouble understanding if I can use a tpl on the carousel to split the data between the different cards)
    I am kinda new to this so any help would be great.
    thanks in advance.

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,255

    Default

    The carousel has a series of child components, so you would specify the appropriate tpl on each child component. Similarly, you would update each component with the appropriate data.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Sencha User
    Join Date
    Nov 2010
    Posts
    448

    Default

    thanks evant
    I think I might be missing some basic understanding cause I am still not sure how to do this. I will go back to the docs and and try to figure out how to apply your answer

  4. #4
    Sencha User
    Join Date
    Nov 2010
    Posts
    448

    Default

    Hi;
    I would like to use a single TPL on the parent component (the carouse)l and reference the children (cards) in that TPL such that when I update the carousel with the whole data causing each card be populated accordingly (for example: the first item in the json response would populate the first card in the carousel and so forth...)
    is this achievable with sencha template/Xtemplate/TPL? is there a reserved word for referencing a component's children from a TPL on that component?
    thanks in advance.

  5. #5
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,255

    Default

    No, it's not supported currently.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Similar Threads

  1. Carousel Stop Card Switch
    By hitman01 in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 28 Oct 2010, 6:32 AM
  2. how to scroll a card in a carousel
    By jodimas in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 4 Oct 2010, 12:20 AM
  3. How to get another inactive card's id in carousel ?
    By Jaeger in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 25 Aug 2010, 4:00 AM
  4. ahref to choose next carousel card.
    By nosarious in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 18 Jul 2010, 10:42 PM
  5. Carousel - Programmatic Card Turning
    By arlo.carreon in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 7 Jul 2010, 11:40 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •