Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
I have a ton of duplicate meta description and title tag errors on my site for category pages. I am trying to fix this by adding in the results on each page (e.g. from 1-13) so that each meta description is unique and it works on the first page of the category, but it doesn't display the total amount of pages and it doesn't update the current page you are on.

Here is the code:
Code: Select all
<cms:if k_is_page>    
         <cms:set nested_parents='' />
         <cms:set sep='' />
         <cms:nested_pages masterpage='shop/category.php' root=k_page_name>
            <cms:set nested_parents="<cms:show nested_parents /><cms:show sep /><cms:show k_nestedpage_name />" scope='parent' />
            <cms:set sep=',' />
         </cms:nested_pages>

         <cms:pages masterpage='shop/product.php' page_name='NOT product_vault' custom_field="more_cats=<cms:show nested_parents />" return_sql='2' >
            <cms:set my_query = "<cms:concat
                            'SELECT p.id, p.template_id, p.k_order' '\n'
                            'FROM ' k_sql_from '\n'
                            'WHERE ' k_sql_where '\n'
                            'UNION'
                            />" 
                   'global'
                   />
         </cms:pages>
      </cms:if>

      <cms:pages masterpage='shop/product.php' page_name='NOT product_vault' folder=k_page_name include_subfolders='1'  return_sql='2'>
         <cms:set my_query = "<cms:show my_query /> <cms:concat
                         'SELECT p.id, p.template_id, p.k_order' '\n'
                         'FROM ' k_sql_from '\n'
                         'WHERE ' k_sql_where '\n'
                         />" 
                'global'
                />
      </cms:pages>

      <cms:query sql="<cms:show my_query />" fetch_pages='1'  limit='1'>
         <meta name="description" content="Page <cms:show k_record_from /> - <cms:show k_record_to /></cms:query> <cms:show k_page_title /> Bronze Statues and Sculptures for sale. We have 20+ Years of Experience. Wholesale Pricing - Call Us Today at (877) 528-2531">


This is the result I get - <meta name="description" content="Page 1 - 1 Eagles Bronze Statues and Sculptures for sale. We have 20+ Years of Experience. Wholesale Pricing - Call Us Today at (877) 528-2531">

Example category page: bronzeman.com/shop/category/eagles/
That's some interesting usage of return_sql='2'. I do have some experience with stuff like that, but no task ever required to have it in such a.. way.
Any idea where I am going wrong?
3 posts Page 1 of 1