Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Support Forum

Start ::  Extensions and Distributions Support ::  Modules ::  Pagesetter : display a tab in parent template only if there is a child

Moderated by: Support Team

Bottom
Pagesetter : display a tab in parent template only if there is a child

  • Link to this postingPosted: 08.05.2007, 20:32
    Profile
    Starguezer
    rank:
    Helper Helper
    registered:
     March 2007
    Status:
    offline
    last visit:
    17.08.08
    Posts:
    127
    It's me, one more time !
    One more question : I use tab to display diferents child in the parent template. But if there isn't any child, it displays an empty tab...
    So I would like to know if it's possible to do something like that
    Code
    <!--[if $generique|count_words >= 1]-->
       <div class="tabbertab">
         <h2>Générique</h2>
            Bla bla blaaa...
       </div>
    <!--[/if]-->

    but with a child ?
    -----
  • Link to this postingPosted: 09.05.2007, 01:10
    Profile Homepage
    videokid
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    12.08.08
    Posts:
    881
    Yes, sure, why not?

    - Igor

    -----
    Have a nice day
    zikulapro.be is currently running
    Zikula 1.0.2
  • Link to this postingPosted: 09.05.2007, 01:18
    Profile
    Starguezer
    rank:
    Helper Helper
    registered:
     March 2007
    Status:
    offline
    last visit:
    17.08.08
    Posts:
    127
    I think that my explication aren't clear.
    I whant to do the same thing that I do in the parent template but with a field comes from the child.

    For exemple : in child form I've got a field $parent (where I creat a relation with a parent) and I whant to display a tab in the parent template only if a child for this parent exist.

    Is it most clearly ?

    (Videokid, you are Blegium, maybe you speak French ? It will be easier for me to speak french by mail if you accept)

    -----
  • Link to this postingPosted: 09.05.2007, 03:51
    Profile Homepage
    videokid
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    12.08.08
    Posts:
    881
    Je suis désolé, mais j'habite dans le Nord, c[avec5]a veux dire que je suis Flamand, et une petite conversation en Francais est peut-etre possible, mais avec des termes tèchnicalles [tèchnaux? icon_rolleyes ], c'est difficile icon_smile . Excusez-moi déjà pour les fautes!
    ------------
    I know there are a lot of accents missing, but I'm on a Querty board. I'm a little lazy to search for the appropriate characters icon_smile
    If someone might read this: I was just saying I live in the Northern part of Belgium, where we speak Dutch.
    ------------
    Back to topic, You'll need an inlineList, ín the parent template, filtering
    Code
    pagesetter_createFilter filter=parent:eq:`$core.pid` assign=parentFilter

    look if there are any
    Code
    pagesetter_readpubCount tid=child_tid filter=$parentFilter assign=pubCount

    then the inlineList
    Code
    <!--[if $pubCount > 0]-->
    pagesetter_inlinePubList pubcnt=$pubCount tid=child_tid filter=$parentFilter
    <!--[/if]-->

    of course all that in Smarty tags.
    - Igor
    -----
    Have a nice day
    zikulapro.be is currently running
    Zikula 1.0.2
  • Link to this postingPosted: 09.05.2007, 04:04
    Profile
    Starguezer
    rank:
    Helper Helper
    registered:
     March 2007
    Status:
    offline
    last visit:
    17.08.08
    Posts:
    127
    Je trouve ton français vraiment bien comparé à mon anglais qui je pense doit être dur à comprendre parfois. Je m'en excuse... Et pour les accents, ne t'en fais pas, sur internet, très peu de personnes les mettent et moi non plus car à l'école j'ai des claviers Qwerty icon_wink

    Thanks for your explications, I try it tomorrow when I will have more time...

    -----
  • Link to this postingPosted: 09.05.2007, 13:51
    Profile
    Starguezer
    rank:
    Helper Helper
    registered:
     March 2007
    Status:
    offline
    last visit:
    17.08.08
    Posts:
    127
    I came to do it and it works very good !
    You are always so good !!!

    Thank you very much !!!

    -----
  • Link to this postingPosted: 10.05.2007, 05:06
    Profile Homepage
    videokid
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    12.08.08
    Posts:
    881
    You're welcome, and oh no, I'm not always good!

    Vous-venez d'où en Belgique?? Si vous voulez, vous pouvez me contacter à videokid [ at ] hotmail.com.

    - Igor



    edited by: videokid, May 10, 2007 - 01:14 AM

    -----
    Have a nice day
    zikulapro.be is currently running
    Zikula 1.0.2

Start ::  Extensions and Distributions Support ::  Modules ::  Pagesetter : display a tab in parent template only if there is a child

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to Zikula