Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

Menu Images


Reply


3 Posts   481 Views

Avatar
J03

Community Member, 3 Posts

24 March 2012 at 4:41am

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!

Avatar
MartinPhone

Community Member, 57 Posts

29 March 2012 at 10:28am

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?

Avatar
J03

Community Member, 3 Posts

30 March 2012 at 3:36am

Fixed it myself thanks :)