Announcement

Collapse
No announcement yet.

Making product description appear as meta description

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

    Making product description appear as meta description

    Hi.

    I would like to make the description of the products appear as the product description, I know this can be done for msql database sites, but what about in actinic?

    Thanks.
    Wayne.
    www.fetishwear-uk.co.uk


    Actinic SEO

    We are specialists in Actinic SEO and have over 12 years experience with this software. PM me for more details if you need any help.


    sigpic

    #2
    You should be able to do this. You also have to deal with pages that don't have products.

    See thread http://community.actinic.com/showthread.php?t=47694 - post #5 - from earlier today which could be adapted to do what you want. Where the "NO PRODUCTS ON PAGE" would be the meta code for Section pages other than those containing products. And the "SOME PRODUCTS ON PAGE" bit would be the meta code that uses the product description.

    Finally, you'd need a reverse test of the final lump of code to include the standard Meta on non-Section pages.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Sorry Norman,

      I've been playing around for the last hour with it and still can't get it to work, I've done everything as per your instructions on the other thread, but can't seem to get meta description to show up on live page.

      I noticed that its for V8 and i'm using V9 think that it still should work correct?

      Steps Ive done so far (after your instructions)

      Created + included new Meta Tags Layout called "Meta Tags for Product Pages"

      inside that layout located block if with meta description and replaced to:

      Code:
      <actinic:block if="%3cactinic%3avariable%20name%3d%22MetaDescription%22%20%2f%3e%20%21%3d%20%22%22" >
      <meta name="description" content="<actinic:variable name="ProductList" value="Empty Product List Code" />" /></actinic:block>
      then inside Empty Product List code layout for Product Pages inserted within block if:

      Code:
      <actinic:block type="ProductList" >
      
      <actinic:block if="%3cactinic%3avariable%20name%3d%22PriceIsEnabled%22%20%2f%3e">
                  
      <actinic:block php="true" >
      $sShort = "";
      $nCount = 0;
      $sOriginal = '<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />'; 
      $sOriginal = preg_replace('/\!\!<|>\!\!/', '', $sOriginal); // remove!!< and >!!
      foreach(explode(" ", $sOriginal) as $sWord)
      {
      if ($nCount > 60)
      {
      $sShort .= "...";
      break;
      }
      $sShort .= $sWord . " ";
      $nCount++;
      }
      
      echo $sShort;
      </actinic:block> 
                			
              </actinic:block>
      </actinic:block>
      the reason for limiting characters is simply because search engines like it when under 70 characters.

      And when I upload everything the whole meta description line is missing

      Would you be so kind and help me to finish it off please?

      thank you in advance.
      Rytis

      Comment


        #4
        You have

        <actinic:block if="<actinic:variable name="MetaDescription" /> != """ >

        So the code will only be generated if the Meta is already there. This sounds wrong.

        You need the opposite test

        <actinic:block if="<actinic:variable name="MetaDescription" /> == """ >

        Please note that we're volunteers here. If you ask someone by name to help you, then all the others volunteers are likely to skip out. Tough luck for you if the named person is disinclined, too busy or unable to help.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Originally posted by NormanRouxel View Post
          You have

          <actinic:block if="<actinic:variable name="MetaDescription" /> != """ >

          So the code will only be generated if the Meta is already there. This sounds wrong.

          You need the opposite test

          <actinic:block if="<actinic:variable name="MetaDescription" /> == """ >

          Please note that we're volunteers here. If you ask someone by name to help you, then all the others volunteers are likely to skip out. Tough luck for you if the named person is disinclined, too busy or unable to help.
          Thank you for showing my mistake, didn't understand completely what you meant "the opposite test" in that thread, but now I do!

          I asked for YOUR help because you made that code, thought no one else would bother to look into it anyway

          Anyway, it now works like a charm!

          Thank you very much!!!

          Another thing, I am interested in buying your "Accordion Menu" & "Sorted Products / Sections" just 1 question, if I decide to upgrade to v10, will these addons work?

          Comment


            #6
            Both Accordion Menu and Sorted Products / Sections are identical between V9 and V10 and should upgrade automatically when you upgrade Actinic.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment

            Working...
            X