Announcement

Collapse
No announcement yet.

MIVA tokens fuctionality in "Page > SEO" fields.

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

    MIVA tokens fuctionality in "Page > SEO" fields.

    Ability to use MIVA tokens work in "Page > SEO" fields to avoid hard-code page templates edits?

    Example:

    Page > SEO (field):
    Code:
    Buy & Sell &mvt:category:name;

    If MIVA tokens don't work in "Page > SEO" field, where would one hard-code edit CTGY page template for:

    Code:
    <meta name="description" content="Buy & Sell &mvt:category:name;">?
    Thank you, Bill Davis

    #2
    If a field doesn't have a Version control, it does not support SMT code (ie.what you call tokens). You would need to replace the <mvt:item name="prodctgy_meta" param="combined" /> (or similar) in the Head Tag with something like:

    <mvt:if expr="g.screen EQ 'CTGY' OR g.screen EQ 'PROD'">
    <meta name="description" content="Buy & Sell &mvt:category:name; &mvt:product:name;
    <mvt:else>
    <meta name="description" content="&mvt:page:name;">
    </mvt:if>

    PRO TIP: Posting the same message in two different forums isn't a good way to get a clear answer, and makes it hard to follow.

    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


      #3
      Originally posted by Bruce - PhosphorMedia View Post
      If a field doesn't have a Version control, it does not support SMT code (ie.what you call tokens). You would need to replace the <mvt:item name="prodctgy_meta" param="combined" /> (or similar) in the Head Tag with something like:

      <mvt:if expr="g.screen EQ 'CTGY' OR g.screen EQ 'PROD'">
      <meta name="description" content="Buy & Sell &mvt:category:name; &mvt:product:name;
      <mvt:else>
      <meta name="description" content="&mvt:page:name;">
      </mvt:if>

      PRO TIP: Posting the same message in two different forums isn't a good way to get a clear answer, and makes it hard to follow.
      Thanks, Bruce. I was in the process of adding an addendum to my post suggesting what I think is the same thing before my browser crashed. Fortunately, the Forum remembers edits (which I will be posting in a few minutes to see if I am on the right track).

      As to posting the same message in two different forums, most definitely agree.

      What happened was that its started out as a question, and then later I concluded that it must be a bug (as you will read momentarily in my addendum).
      Thank you, Bill Davis

      Comment


        #4
        Originally posted by William Davis View Post

        Thanks, Bruce. I was in the process of adding an addendum to my post suggesting what I think is the same thing before my browser crashed. Fortunately, the Forum remembers edits (which I will be posting in a few minutes to see if I am on the right track).

        As to posting the same message in two different forums, most definitely agree.

        What happened was that its started out as a question, and then later I concluded that it must be a bug (as you will read momentarily in my addendum).
        Bruce, please check out my Addendum here and tell me if we are on the same page.
        Last edited by William Davis; 07-30-16, 02:56 PM.
        Thank you, Bill Davis

        Comment


          #5
          Originally posted by Bruce - PhosphorMedia View Post
          If a field doesn't have a Version control, it does not support SMT code (ie.what you call tokens). You would need to replace the <mvt:item name="prodctgy_meta" param="combined" /> (or similar) in the Head Tag with something like:

          <mvt:if expr="g.screen EQ 'CTGY' OR g.screen EQ 'PROD'">
          <meta name="description" content="Buy & Sell &mvt:category:name; &mvt:product:name;
          <mvt:else>
          <meta name="description" content="&mvt:page:name;">
          </mvt:if>

          PRO TIP: Posting the same message in two different forums isn't a good way to get a clear answer, and makes it hard to follow.
          Like this? If no, for purposes of learning, why?


          Code:
          <mvt:if expr="g.screen EQ 'CTGY'">
                  <meta name="description" content="Buy & Sell &mvt:category:name;">
          <mvt:if expr="g.screen EQ 'PROD'">
                  <meta name="description" content="Buy & Sell &mvt:product:name;">
          <mvt:else>
                  <meta name="description" content="&mvt:page:name;">
          </mvt:if>
          Remember, I'm coming from MM4.24c world so be patient with me... :)
          Last edited by William Davis; 07-30-16, 05:07 PM.
          Thank you, Bill Davis

          Comment


            #6
            Correct idea, minor syntax issue: you need to close the first mvt:if or use mvt:elseif=""
            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


              #7
              Originally posted by Bruce - PhosphorMedia View Post
              Correct idea, minor syntax issue: you need to close the first mvt:if or use mvt:elseif=""
              Can you please provide me an example, I'm totally new to this or point me to where I can find conditional documentation?
              Thank you, Bill Davis

              Comment


                #8
                Code:
                 
                 <mvt:if expr="g.screen EQ 'CTGY'">         <meta name="description" content="Buy & Sell &mvt:category:name;"> <mvt:ELSEif expr="g.screen EQ 'PROD'">         <meta name="description" content="Buy & Sell &mvt:product:name;"> <mvt:else>         <meta name="description" content="&mvt:page:name;"> </mvt:if>
                http://docs.miva.com/developers, However, it does help to have some basic background in scripting. I don't know of a resource that shows SMT script in conjunction with basic scripting ideas like conditions, variables and variable scoping, logical branching etc. Javascript tutorials might be a good start, in that, you'd also learn some JS along the way which wouldn't hurt.
                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

                Working...
                X