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

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 ?
Yes, sure, why not?

- Igor
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)
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
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 ;)

Thanks for your explications, I try it tomorrow when I will have more time...
I came to do it and it works very good !
You are always so good !!!

Thank you very much !!!
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