Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi,
in order to differentiate the folders in my xml site map, want to include the name of the folder in the meta description and in the title, in the list view.

I put the date like date to differentiate the archives:
<title>Blog de tableaux sur toile <cms:date k_archive_date /></title>

but I can't seem to add the folder name so it would render

Blog de tableau sur toile, Art et débats, 23/10/2013
for exemple

Is it possible?

Thanks,
paolo
Hi Paolo,

We can get the folder name in 'page-view' (the folder the page belongs to) and in 'folder-view' (the folder being visited).

However, in 'archive-view' (which is what you seem to be dealing with as appears by the use of k_archive_date), the folder name is not available by default.

If you think about it, 'archive-view' lists all pages belonging to a particular *time-period* - these pages could belong to different folders. So, really it is not possible to give info about folder in this view.

Please let me know if you think I misunderstood the problem.

Thanks.
Hi,

Ok, my bad, the explication wasn't clear.

I defined 6 folders to use them as categories for the blog:
Art et tableaux
Connaissance
Divers
Expositions
Edward Hopper
Tableaux expliqués

I want to know if there's a possibility to give the <title> and <meta name="description"> tags their respective category names, so it appears differentiated in my site map, thus for the spiders.

Kindly have a look at http://www.tableaux-sur-toile.com/sitemap/
and the file attached.

Like for the 'connaissance' category of the blog, the title would go from:

Blog de tableaux sur toile November 11, 2013 (it's the same title for each category)

to

Blog de tableaux sur toile, connaissance, November 11, 2013

So it would become more clear for my customers and the crawlers.

Thanks,
Regards,
Paolo

Attachments

Ok, forget it, I just added k_folder_title and it worked.

The answer was in fact in the question rightly formulated...

I don't know why I was focused on K_page_title

Sorry to have wasted your time,

best regards,
Paolo
Don't worry about that Paolo ;)

Give this a try though if you want:
Code: Select all
<title>Blog de tableaux sur toile, <cms:if k_is_folder><cms:show k_folder_title/>, </cms:if><cms:date k_archive_date format='F, Y'/></title>

Alternatively, I don't see the point in displaying the date for non-archive views:
Code: Select all
<title>Blog de tableaux sur toile<cms:if k_is_folder>, <cms:show k_folder_title/></cms:if><cms:if k_is_archive>, <cms:date k_archive_date format='F, Y'/></cms:if></title>

You could use something similar for the meta description:
Code: Select all
<meta name="description" content="<cms:if k_is_folder><cms:show k_folder_title/>: </cms:if><cms:if k_is_archive><cms:date k_archive_date format='F, Y'/>: </cms:if>...">
5 posts Page 1 of 1