Image on menu for new page

Discussion in 'TemplateCodes' started by gadgit7, Jun 17, 2009.

  1. gadgit7 Customer

    Hi,

    Firstly, 68classifieds is a great system :)

    Now...I've madea new page and its i the navigation menu just fine...how do i get a different image on that menu item rather than the red dot thing?

    Thanks

    Gary :)
  2. Eric Barnes Guest

    Which template are you using? Also is it possible to share the link to the site?
  3. gadgit7 Customer

  4. Eric Barnes Guest

    I don't have that template but this should work. Open layout.tpl and find this:
    Code:
    {foreach from=$templatepages item="entry"}
    <li><a href="{$smarty.const.URL}/pages.php?pg={$entry.pURI}">{$entry.pPageTitle}</a></li>
    {/foreach}
    
    Next replace the opening "a" tag with this:
    Code:
    <a class="{$entry.pURI}" href="{$smarty.const.URL}/pages.php?pg={$entry.pURI}">
    
    Then it will assign a class that you can use in your style sheet.
  5. gadgit7 Customer

    I tried that but nothing appears to have changed in the css and i still can't see where to change the menu icons? Thanks anyway for the help. I'll have another look tomorrow :)

    Gary
  6. gadgit7 Customer

    Ok...I still have the smal dots as menu images for the new pages. I still can't work out how to find and replace these menu images?
    Any more ideas please?

    Thanks

    Gary :)
  7. seymourjames All Hands On Deck

    Hi Gary,

    Wondered when you come on the forum. The little dots are defined in your css file here

    ul.sidebar_nav a {
    display: block;
    margin: 0;
    padding: 6px 10px 6px 30px;
    font-size: 11px;
    line-height: 16px;
    font-weight: bold;
    background: #fff url(../images/icons/bullet_orange.gif) no-repeat 12px center;
    text-decoration: none;
    }

    As you can see they are using a file called bullet_orange.gif which sits in the template's images folder - specifcally the folder called icons (each template has its own images folder so you need to repeat the process of replacing this image for each of the templates if you intend to use all of the colors). In general each of the menu items has an image in the same directory. You don't need to change their name. Just replace them with what you want to display.
  8. gadgit7 Customer

    Hi james,

    Yes..back again for another day ;)

    Thanks for the tips...If I change the image in the images folder I will get that image everywhere on tha page (eg categories menu aswell). I just want to change the menu heading images on the two new pages I created.
    Does this make sense? sry but i'm a noob at this stuf...but learning fast ;)

    Thanks again

    Gary :)
  9. seymourjames All Hands On Deck

    ahh. Yes it will. You will need to do what Eric was suggesting. Go into member_nav.tpl in the templates directory of module/templatezones. This is where the menu is being created. Find this line

    {foreach from=$templatepages item="entry"}
    <li><a href="{$smarty.const.URL}/pages.php?page={$entry.pageID}">{$entry.pPageTitle}</a></li>
    {/foreach}

    Then put the class you wish to apply to the link

    {foreach from=$templatepages item="entry"}
    <li><a class="mypages" href="{$smarty.const.URL}/pages.php?page={$entry.pageID}">{$entry.pPageTitle}</a></li>
    {/foreach}

    Then go into the main css file and define yourself a new class and put the image you want in your image/icons directory

    ul.sidebar_nav a.mypages {
    background: url(../images/icons/mypages.gif) no-repeat 10px center;
    }

    You may have to adjust that 10px. Try it out first.
  10. gadgit7 Customer

    :D woohoo...excellent thanks for that. Would be nice to have different images for each new page but at least I have an image and not a dot!! Thanks again (if you knowhow to do different for each menu item let me know...but you've done enough already...)
    Cheers

    gary :)
  11. Eric Barnes Guest

    That can be done. Change what David posted to this:
    <li><a class="mypages_{$entry.pageID}" href="{$smarty.const.URL}/pages.php?page={$entry.pageID}">{$entry.pPageTitle }</a></li>

    Then in the style sheet add:
    ul.sidebar_nav a.mypages_1 {
    background: url(../images/icons/mypages.gif) no-repeat 10px center;
    }

    Where 1 is the id of the page you want different.
  12. Hey Me Customer

    Why is there no member_nav.tpl in the package I got?
  13. Hey Me Customer

    Got it, content added to the accordion.

    Please update your instructions files & fix some mistakes there like this one:

    * Displays a list of the 5 most visited categories
    Path to template:
    * modules/templatezones/templates/payment_providers.tpl
  14. seymourjames All Hands On Deck

    Correct - in the Fluid templates the member_nav.tpl contents was put into the accordion due to popular request.

    Thanks - it should say popular_categories.tpl in the documentation. Did you find any others?

Share This Page