Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • hetaurhet 245 posts 267 karma points
    Feb 13, 2012 @ 13:23
    hetaurhet
    0

    Next link not showing

    I have following razor script. To navigate previous and next node and middle link to parent node. this is then inserted in every child node.

    <div id="bottomNavigation" style="clear:both;">
         <center>
    @{
         
            if (@Model.Previous() != null) {
               <div> <a href="@Model.Previous().Url"> Previous</a></div>
            }
          
         else if(Model.Where("nodeTypeAlias == \"Treasure\""))
          {
          <div> <a href="@Model.Parent.Url">Back To Akram Treasure</a></div>    
          }
          
      
          if (@Model.Next() != null) {
               <div> <a href="@Model.Next().Url">Next</a></div>
            }
        
        }
    </center>
      </div>

    the problem is that it is not showing Next link. It shows 'Previous' and 'Back To Akram Treasure' but why not showing 'Next'? If I remove code of 'Back To Akram Treasure' link then it shows Next link.


  • hetaurhet 245 posts 267 karma points
    Feb 17, 2012 @ 07:38
    hetaurhet
    0

    if I take code of next before back to Akram treasure then also it works. Any idea why not working? Everybody any clue?

  • hetaurhet 245 posts 267 karma points
    Feb 17, 2012 @ 07:53
    hetaurhet
    0

    Solved the problem...

    used following code

    if(@Model.NodeTypeAlias=="Treasure")
          {
          
             <div><a href="@Model.Parent.NiceUrl">Back To Akram Treasure</a></div>  
      
          }

    instead of previous one

Please Sign in or register to post replies

Write your reply to:

Draft