Announcement

Collapse
No announcement yet.

Images in Mega Menu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Images in Mega Menu

    Is it possible to add images to the Mega Menu, these can either be custom images, or those set at section level?

    I have searched the forum, and advance user guide so have either missed this, or it is not possible.

    Many thanks

    Jason
    Regards

    Jason

    Titan Jewellery (Swift Design)
    Zirconium Rings
    Damascus Steel Rings

    #2
    You can but it will depend on your knowledge of code. You can edit Mega Menu Sub Section Links / More Section Links. To add an image before the link using the section variable. Or use a custom variable. Bear in mind image sizes you may wish to use a thumbnail image.
    Peblaco

    Comment


      #3
      Once again Louise, many thanks.

      I shall have a play and see what I can do.

      Jason
      Regards

      Jason

      Titan Jewellery (Swift Design)
      Zirconium Rings
      Damascus Steel Rings

      Comment


        #4
        Ok I have managed to get this working using custom variables for both the text and image but am having problems with layout.

        When previewing the site offline, the layout seems fine, however when i publish to a live site (sorry no live site to view) the layout is all over the place.

        I enclose a screen shot of the problem, and my code from "Mega Menu Sub Section Links"

        I have tried many different things that I have read online but can't seem to get the layout correct.

        Would appreciate it if someone could point out anything that may be obvious, or any pointers.

        Many thanks

        Jason




        HTML Code:
        <actinic:block php="true" >
        	
        	//Hold variable for maximum number to show 
        	$maxNumberSubSubSections = <actinic:variable encoding="perl" name="MaxNumDropLinks" selectable="false" />;
        	$sSectionName = strip_tags("<actinic:variable name="Mega Menu Text Heading" />");
        	$listHeader = '<li><a href="<actinic:variable encoding="perl" name="SectionURL" selectable="false" />"><img src="<actinic:variable name="MegaMenuImage" />" width="100" height="50"></a><a class="dropheading" href="<actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsFilteringPageAsDefaultView%22%20%2f%3e%20%3d%3d%20False%29%20AND%0d%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable encoding="perl" name="SectionPageName" selectable="false" /></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22IsFilteringPageAsDefaultView%22%20%2f%3e%20OR%0d%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable encoding="perl" name="SectionURL" selectable="false" /></actinic:block>">'.$sSectionName.'</a>';
        	$ulMoreLink = '<li><a class="dropfooter" href="<actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsFilteringPageAsDefaultView%22%20%2f%3e%20%3d%3d%20False%29%20AND%0d%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable encoding="perl" name="SectionPageName" selectable="false" /></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22IsFilteringPageAsDefaultView%22%20%2f%3e%20OR%0d%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable encoding="perl" name="SectionURL" selectable="false" /></actinic:block>">more pages....</a></li>';
        	echo '<ul>';
        	$subKids= array();
        </actinic:block>
        
        <actinic:block if="%3cactinic%3avariable%20name%3d%22MegaMenuDepth%22%20%2f%3e%20%3d%3d%20%273rd%20level%27" >
        	<actinic:block php="true" type="ChildSectionList" >
        	<actinic:block if="%3cactinic%3avariable%20name%3d%22IsSectionIncludedInSiteMap%22%20%2f%3e%20%26%26%20%3cactinic%3avariable%20name%3d%22ShowSectionInMegaMenu%22%20%2f%3e" >	
        		$sSectionName = strip_tags("<actinic:variable name="Mega Menu Text Heading" />");
        	  $sSubLink = '<a href="<actinic:variable encoding="perl" name="SectionURL" selectable="false" />"><p class="product-image set-left"><img src="<actinic:variable name="MegaMenuImage" />" alt="<actinic:variable name="Mega Menu Text Heading" />" width="50" height="50"> <p class="h1" </a><actinic:variable name="Mega Menu Text Heading" /><a class="droplink" href="<actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsFilteringPageAsDefaultView%22%20%2f%3e%20%3d%3d%20False%29%20AND%0d%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable encoding="perl" name="SectionPageName" selectable="false" /></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22IsFilteringPageAsDefaultView%22%20%2f%3e%20OR%0d%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable encoding="perl" name="SectionURL" selectable="false" /></actinic:block>">'.$sSectionName.'</a>';
        		array_push($subKids,$sSubLink);
        
        	</actinic:block>
        </actinic:block>
        </actinic:block>
        
        
        <actinic:block php="true" >
        
        	if (count($subKids) > 0) {
        		echo $listHeader;
        		$itemCount = 0;
        		foreach ($subKids as $subKid) {
        			if ($itemCount < $maxNumberSubSubSections) {
        				echo '<li>' . $subKid . '</li>';
        			}
        			else {
        				echo $ulMoreLink;
        				break;
        			}
        			$itemCount++;
        		}
        	}
        	else
        	{
        		echo $listHeader;
        	}
        	$subKids	= null;
        </actinic:block>
        	
        
        
        
        <actinic:block php="true" >
        		echo '</ul>';
        </actinic:block>
        Attached Files
        Regards

        Jason

        Titan Jewellery (Swift Design)
        Zirconium Rings
        Damascus Steel Rings

        Comment

        Working...
        X