Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2011
    Posts
    4
    Plugin Contributions
    0

    Default Custom Main Page With Dynamic URLs

    Hi. I am trying to figure out how to integrate the dynamic URL system into my custom menu on the main page. My menu consists of a thumbnail image for each category. I want each thumbnail to link to the dynamic ZC link for that category. Here's the code for my menu in define_main_page.php:


    <div id="mainMenu">
    <table>
    <tr>
    <td ><a href="" ><img src="/images/t_platters.gif"><br>Platters and Plates</a></td>
    <td><a href="" ><img src="/images/t_bowls.gif"><br>Bowls</a></td>
    <td><a href="" ><img src="/images/t_smallDishes.gif"><br>Small dishes</a></td>
    </tr>
    <tr>
    <td><a href="" ><img src="/images/t_sconces.gif"><br>Sconces</a></td>
    <td><a href="" ><img src="/images/t_wallPieces.gif"><br>Wall Pieces</a></td>
    <td><a href="" ><img src="/images/t_windowHangings.gif"><br>Window Hangings</a></td>
    </tr>
    </table>
    </div>

    I think I might need to use a php function in the href but I'm not sure which one.

    I searched a lot for this so hopefully it's not a repost.

    My Specs: I'm using ZC v1.3.9h which has not been upgraded. I have not installed any add-ons.

  2. #2
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Custom Main Page With Dynamic URLs

    could try:

    <a href="/index.php?main_page=index&cPath=1"><img src="<?php echo DIR_WS_TEMPLATE ?>images/t_platters.gif" border="0" /></a>

  3. #3
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Custom Main Page With Dynamic URLs

    You know you can just turn on a list of categories from your Admin? No custom coding required.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Custom Main Page With Dynamic URLs

    Yes, if you don't want your homepage category navigation to be in a sidebox, admin > Configuration > Layout Settings > Categories always show on main page
    and
    Main page opens with category -> set to 0

    Then you can style the list as you like. See this site for an example: afzdesign .com/cadante

  5. #5
    Join Date
    Feb 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: Custom Main Page With Dynamic URLs

    Quote Originally Posted by gjh42 View Post
    Yes, if you don't want your homepage category navigation to be in a sidebox, admin > Configuration > Layout Settings > Categories always show on main page
    and
    Main page opens with category -> set to 0

    Then you can style the list as you like. See this site for an example: afzdesign .com/cadante
    This might work. What do I do if I want to leave out one category from the list?

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Custom Main Page With Dynamic URLs

    That depends on where the category is in the list. It would be possible to use CSS rules to hide the category in a particular position in the list, though if it moves in the list order a different category would be hidden instead. Is your top category list stable? Will it change often? Seeing your site live will let me give the exact CSS to hide a particular category.

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Custom Main Page With Dynamic URLs

    Copied from your other thread and extended so info stays where it is relevant:
    You are already hardcoding the entire menu, so I see no benefit to calling zen functions here. Just use a straight HTML link.

    <a href="index.php?main_page=index&amp;cPath=65"><img src="/images/t_platters.gif"><br>Platters and Plates</a>

    Putting these in a table is antiquated coding practice and completely unnecessary. Especially if they are hardcoded, use a <ul id="customCategoriesMenu"> list and style them in your stylesheet under that id.

 

 

Similar Threads

  1. Is it possible to change the dynamic URLs with words?
    By Oredayo in forum General Questions
    Replies: 1
    Last Post: 11 Dec 2010, 09:24 PM
  2. Dynamic Main Page
    By Makover in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Aug 2008, 08:33 AM
  3. Defining different (dynamic) main page
    By Dzy in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 25 Jun 2008, 10:25 PM
  4. Internal Links Dynamic Urls
    By hemz in forum General Questions
    Replies: 1
    Last Post: 12 May 2008, 09:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg