Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Menu Images

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 439 Views
  • J03
    Avatar
    Community Member
    3 Posts

    Menu Images Link to this post

    Started using SilverStripe a couple weeks ago and it's awesome! I really like the templating system..

    Almost finished the website and all that's left is to add a jQuery drop down menu that lists images with their title. I mostly have the code working for the jQery part however I am having problems with the images..

    Following this tutorial I have an images tab on each page http://www.silverstripe.org/archive/show/3985. This works fine when I add an image to the top level Products page. But if I add it to one of the child pages the image doesn't show up. I have tried uploading a new image and using an existing one.. It only shows assets/Uploads/..

    Navigation.ss code:

    <script>
    $(document).ready(function(){
       $("#nav").dropmenu();
    });
    </script>
    <ul id="nav" class="dropmenu">
       <div class="dropz">
       <% control Menu(1) %>   
        <li><a href="$Link" title="$Title.XML">$MenuTitle.XML</a></li>
       
             <% if Children %>
                <% if Title == Products %>
           <ul>
           <div class="productsLeft"><li>$ProductImg1.SetWidth(50)<h2>$MenuTitle.XML</h2><p><a href="$Link" title="$Title.XML">$MenuTitle.XML</a></p></li></div>
           </ul>
          <% end_if %>
                <% if Last %>
                <ul class="last_subnav">
                <% else %>
                <ul>
                <% end_if %>
                   <% control Children %>
                   <li><a href="$Link" title="$Title.XML">$MenuTitle.XML</a></li>
                   <% end_control %>
                </ul>
             <% end_if %>
       <% end_control %>
    </ul>

    I can post screenshots if it helps.. Thanks!

  • MartinPhone
    Avatar
    Community Member
    57 Posts

    Re: Menu Images Link to this post

    Did you fix this? When you say assets/uploads/.. are they your dots.. ? Is the image working ok on the child's page itself?

    Maybe a screenshot?

  • J03
    Avatar
    Community Member
    3 Posts

    Re: Menu Images Link to this post

    Fixed it myself thanks

    439 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.