I'm not sure if I'm 100% understanding your end goal but there are a
few things to keep in mind.  You won't be able to nest .HasChildren()
methods because you get a boolean results from the first one (true /
false) and then you are basically asking if true / false has
children ... which of course isn't going to work out too great.

I think you are more on target using a navigation template.  If your
only requirement is to show the pages underneath the homepage if they
don't have children the simpliest approach would be to build a
navigation template which doesn't output anything from the home
(either by a conditional in your template or by the use of areas and
assigning a template that doesn't output anything on the first level).

It almost sounds like you may have set your navigation area to 1-2 and
are using the same template to output .. so home (level 1) says 'Yeah
I got me some children' and writes itself out because the template is
set to levels 1-2 and the same output template.  Once it's done with
home it moves up to level 2 and outputs the ones of those that has
children as well.  A simple template like below can be used to skip
over the levels you don't want to see.

<reddot:cms>
    <htmltext>
        <navigation:nextlevel>
    </htmltext>
</reddot:cms>

So with this solution you have 2 templates for navigation.  Whenever
you want to just crawl some levels without showing anything you set
that to the first template and the navigation area in your case to
something like:

Drag the generic template that just crawls the navigation over to the
area and set:
Special Level 1-1 Selected

Than drag over your template that will show your links and set:
Special Level 2-2 Select and Not Selected

Now the navigation area should just show you the pages at the second
level and no more home.  The rest of your template looked fairly close
but I'm not sure what the 'CurrentIndex.Page.Stuff' is ... normally
for Headline, Id, GetUrl you do not need the 'Page' piece so basically
just the code you have second.

Hope that helps out.



On May 27, 8:03 am, sharon <[email protected]> wrote:
> Hi All
>
> I want to query using Renedr tags if --> Context:CurrentIndex have
> Grandchildren, i tried
>
>  <reddot:cms>
>   <if>
>     <query valuea="Context:CurrentIndex.HasChildren.HasChildren()"
> operator="==" valueb="Bool:True">
>       <htmltext>
>
>  <navigation:nextlevel>           </htmltext>
>     </query>
>   </if>
> </reddot:cms>
>
> but no use it doesn't work, actually i want to display all the pages
> under home if they don'y have children pages but not able to find a
> way out, if
>
> i execute the following query in second level navigation template
>
> <reddot:cms>
>   <if>
>     <query valuea="Context:CurrentIndex.HasChildren()" operator="!="
> valueb="Bool:True">
>       <htmltext>
> <ul>
> <li><a href="<%!! Context:CurrentIndex.Page.GetUrl!!%>">
> <%!! Context:CurrentIndex.Page.Headline !!%> </a> </li>
> </ul>
> <ul>
> <li><a href="<%!!Context:CurrentIndex.GetUrl()!!%>">
> <%!!Context:CurrentIndex.Headline!!%> </a> </li>
> </ul>
>
>   </htmltext>
>     </query>
>
> Home keeps on repeating for every entry, can i define any loop under
> queries???
>
> Thanks in Advance
> Sharon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/RedDot-CMS-Users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to