My template uses both levels and flags. The levels determine which
pages appear, and we use an option list as a flag to change the html
that is inserted for the list item based on whether the page is
protected content or not. In the template that I will paste below I
have removed the difference between the two cases, because it doesn't
really matter to you. So as it stands this code shows the current page
and its siblings, and their children. You could remove the part that
displays the siblings' children, and you could use the
opt_is_protected part of the code to either display or not display
flagged pages with a little modification. Nav manager will do your
bidding with enough poking and prodding and banging your head against
the desk. You'll notice a few if statements in there that seem
redundant, I assure you, they aren't. Nav manager is quirky that way,
sometimes logically equivalent statements do not produce equivalent
results. Anyway, here is the code, see how close it is to doing what
you want as it stands and play with it until it works for you. Good
luck!

<reddot:cms>
    <if>
        <query valuea="Context:CurrentIndex.Id" operator="=="
valueb="Context:LastIndex.Id">
        <htmltext>
        <ul>
        </htmltext>
             <foreach itemname="PeerIndex"
object="Context:CurrentIndex.Parent.SubIndexes">

                            <if>
                                <query
valuea="Store:PeerIndex.Page.Elements.GetElement(opt_is_protected).Id"
operator="!=" valueb="Escape:null">
                                    <htmltext>
                                        <li><a href="<%!!
Store:PeerIndex.GetUrl() !!%>"><%!! Store:PeerIndex.Headline !!%></a></
li>
                                    </htmltext>
                                </query>
                            </if>

                            <if>
                                <query
valuea="Store:PeerIndex.Page.Elements.GetElement(opt_is_protected).Id"
operator="==" valueb="Escape:null">
                                    <htmltext>
                                        <li><a href="<%!!
Store:PeerIndex.GetUrl() !!%>"><%!! Store:PeerIndex.Headline !!%></a></
li>
                                    </htmltext>
                                </query>
                            </if>

                          <if>
                            <query
valuea="Store:PeerIndex.HasChildren()" operator="=="
valueb="Bool:True">
                              <htmltext>
                                <ul>
                              </htmltext>
                            </query>
                          </if>

                        <foreach itemname="ChildIndex"
object="Store:PeerIndex.SubIndexes">
                            <if>
                                <query
valuea="Store:ChildIndex.Page.Elements.GetElement(opt_is_protected).Id"
operator="!=" valueb="Escape:null">
                                    <htmltext>
                                        <li><a href="<%!!
Store:ChildIndex.GetUrl() !!%>"><%!! Store:ChildIndex.Headline !!%></
a></li>
                                    </htmltext>
                                </query>
                            </if>
                            <if>
                                <query
valuea="Store:ChildIndex.Page.Elements.GetElement(opt_is_protected).Id"
operator="==" valueb="Escape:null">
                                    <htmltext>
                                        <li><a href="<%!!
Store:ChildIndex.GetUrl() !!%>"><%!! Store:ChildIndex.Headline !!%></
a></li>
                                    </htmltext>
                                </query>
                            </if>
                          </foreach>
                          <if>
                            <query
valuea="Store:PeerIndex.HasChildren()" operator="=="
valueb="Bool:True">
                              <htmltext>
                                </ul>
                              </htmltext>
                            </query>
                          </if>
                        <htmltext>
                            </li>
                        </htmltext>
            </foreach>
            <htmltext>
                </ul>
            </htmltext>
        </query>
        <query type="else">
            <htmltext>
                <navigation:nextlevel>
            </htmltext>
        </query>
    </if>
</reddot:cms>


On Jan 14, 2:03 pm, Kenny Dendow <[email protected]> wrote:
> Hi Emily, Kim, Jian and Casey,
>
> Thanks for the replies!
>
> Emily - The project is being built in MS 9 because that's what the
> server (running a few other projects) has. The plan is to upgrade to
> 10.1 this year. Updating training documentation, how-to videos and
> providing support to less self-sufficient users is the primary barrier
> to the upgrade.
>
> Kim - There's a requirement for a breadcrumb and ideally a sitemap, so
> I would need to stick with one navigation area. I've experimented
> using a foreach loop in the navigation template to go through the
> PathArray of the LastIndex. I can see how it could work, except when
> there are multiple flagged pages within the path.
>
> _________
> About Us
>     Our Values
>     Leadership
>         Europe
>         North America
>             Canada
>             United States
>     How We Operate
>     Views and Positions - FLAGGED
>         Access and Affordability
>         Innovation
>             Intellectual Property Protection
>             Evidence-based Regulatory Environment
>             Global Business Environment - FLAGGED
>                 Page A
>                 Page B
>         Quality and Safety
>         Sales and Marketing
> Responsibility
> Research
> Products
> _________
>
> I don't know if there is a way to use or fake variables. IE: Loop
> through the path and find the level of the last flagged page, set that
> as a variable value, then if the currentLevel in the navigation
> template is less than the variable's value, don't render anything and
> proceed to the nextLevel.
>
> Jian - Generating the navigation from the sitemap is an interesting
> idea and not something I would have thought of. I would be hesitant to
> render the navigation client-side though, as some search engines/bots
> and older screen readers may not execute javascript. Parsing the
> sitemap XML using ASP would work, but there's probably a performance
> hit in SmartEdit while doing so.
>
> Casey - The missing 'Quality and Safety' and 'Sales and Marketing' was
> an oversight on my part, and should be displayed while on the
> Innovation page.  In your case, are you using levels or flags on the
> page like Kim suggested?
>
> Thanks again!

-- 
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