Announcement

Collapse
No announcement yet.

Including a Page link in the Top Categories Navigation Set

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

    Including a Page link in the Top Categories Navigation Set

    Including a Page link in the Top Categories Navigation Set is the easy part. How do I also get an image to display with it? The categories all can have a Custom Category Field to include the image path. How do I fudge the "system" to also have an image for the linked page?


    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Hi Leslie,

    You may have to create the "page" as a category, create a new page that has the content you want, and set the "page" category to use the new page as the layout.
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Originally posted by lesliekirk View Post
      Including a Page link in the Top Categories Navigation Set is the easy part. How do I also get an image to display with it? The categories all can have a Custom Category Field to include the image path. How do I fudge the "system" to also have an image for the linked page?

      Do the navigation set still not have a category code or ID in the navigations array?
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


        #4
        Originally posted by Bruce - PhosphorMedia View Post

        Do the navigation set still not have a category code or ID in the navigations array?
        I don't think a Page link would have a category code but it might have an ID...
        Leslie Kirk
        Miva Certified Developer
        Miva Merchant Specialist since 1997
        Previously of Webs Your Way
        (aka Leslie Nord leslienord)

        Email me: [email protected]
        www.lesliekirk.com

        Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

        Comment


          #5
          ok, confused. You mentioned Custom Category images so I assumed the link was to a category. If the link is to a page you would need another approach, depending on the number of pages you are looking to create a image link, you might need something like this (pseudo code)

          ASSIGN PageImage_A to /this/path/filename
          ASSIGN PageImage_B to /this/path/filename
          ASSIGN PageImage_C to /this/path/filename
          ASSIGN PageImage_D to /this/path/filename

          and then in the loop

          IF page_url EQ 'xxxx'
          EVAL PageImage_A
          ELSEIF page_url EQ 'yyyy'
          EVAL PageImage_B

          You of course could just straigh eval the image path, but the above method would make management/updating slightly easier and less prone to breaking things.
          Bruce Golub
          Phosphor Media - "Your Success is our Business"

          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
          phosphormedia.com

          Comment


            #6
            I'm glad I'm not the only one having trouble with this ;) Here's the info from the top categories navigation set... the alt nav item name shows not the image.. so where does or should it pull the image from? Shouldn't it pull from the cat title image or cat tree image? one of those?

            <mvt:if expr="NOT ISNULL l.settings:readytheme:navigationitems">
            <section class="o-layout t-featured-categories t-defer-object" data-defer>
            <h4 class="o-layout__item u-width-12 c-heading-charlie u-text-bold u-text-center x-product-list__heading t-featured-categories__heading">Top Categories</h4>
            <mvt:foreach iterator="navigationitem" array="readytheme:navigationitems">
            <mvt:item name="customfields" param="Read_Category_Code(l.settings:navigationite m:link_dest, 'top_category_image', l.settings:navigationitem:top_category_image)" />
            <div class="o-layout__item u-width-6 u-width-3--m u-text-center x-product-list__item">
            <a class="u-block u-color-black x-product-list__link" href="&mvte:navigationitem:url;" target="&mvte:navigationitem:link_targ;">
            <figure class="x-product-list__figure">
            <picture>
            <img class="x-product-list__image" data-src="&mvte:navigationitem:top_category_image;" src="" alt="&mvte:navigationitem:name;">
            </picture>
            <figcaption class="x-product-list__figure-caption">
            <span class="x-product-list__name">&mvte:navigationitem:name;</span>
            </figcaption>
            </figure>
            </a>
            </div>
            </mvt:foreach>
            </section>
            <br>
            <!-- end t-featured-categories -->
            </mvt:if>
            Last edited by charmandhammer; 06-27-21, 07:34 PM.
            Thank you,
            Terri
            http://www.charmandhammer.com
            Gear for Hard Working Women

            Comment


              #7
              charmandhammer - The categories you are using for this section should have an image uploaded to the "Top Category Image" custom field for it to show.
              Matt Zimmermann

              Miva Web Developer
              Alchemy Web Development
              https://www.alchemywebdev.com
              Site Development - Maintenance - Consultation

              Miva Certified Developer
              Miva Professional Developer

              https://www.dev4web.net | Twitter

              Comment


                #8
                That Works! Thank you.
                Thank you,
                Terri
                http://www.charmandhammer.com
                Gear for Hard Working Women

                Comment

                Working...
                X