Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
How would I go about having unique meta descriptions for every folder and page I create with couch? For folders I have added descriptions to them in the admin section but I don't see it updating in the source.
Just like with any editable region or available variable, you must explicitly use it in your code. Couch can't make these assumptions for you. You can always use <cms:dump/> on a page to see what variables you have available if you are unsure. In this case the descriptions are available in a variable called 'k_folder_desc':
Code: Select all
<meta name="description" content="<cms:excerpt count='100'><cms:show k_folder_desc /></cms:excerpt>">
It is advised that you not create new lines when entering in the folder descriptions.
Thank you! That did the trick. I'll look how to use cms:dump. Not sure what you mean about a new line.
Well I just meant don't hit Enter on your keyboard, as you should be creating paragraphs for meta descriptions.
Don't do this.
Don't do this.
Don't do this.
This is good. This is good. This is good.

Also, it looks like you are outputting two meta descriptions across your blog list pages, one specific to the folder and a generic one. You should do something like below to prevent that:
Code: Select all
<cms:if k_is_folder >

<meta name="description" content="<cms:excerpt count='100'><cms:show k_folder_desc /></cms:excerpt>">

<cms:else/>

<meta name="description" content="We aim to give our readers the best resources to help improve their lives, relationships, careers, businesses and finances for free. Sharpen Your Axe, Get The Edge & Change Your Life!">

</cms:if>
Ah I see. Thank you so much for your help! I really appreciate it.
5 posts Page 1 of 1