![]() |
sitemap.php customization
As it is now, it just lists the product names. But I would like to add the short description (products:descr) to the listing as well.
I found the fuction page of the sitemap module (modules/sitemap/func.php) and was able to swap out line 334: $select[] = "$sql_tbl[products].product AS name"; to $select[] = "$sql_tbl[products].descr AS name"; which did substitute the description for the name in the sitemap. But I would like both the name of the product and the description of the product in the sitemap, and I don't know enough about how this works to get them to both show up in the sitemap link. I tried changing the skin/common_files/modules/item_products.tpl along with the func.php file, but I'm not grasping how to do this. I want, I think, something like this in the item_products.tpl: {foreach from=$items item="item" key="num"} <li><a href="{$item.url}" title="{$item.name|escape}">{$item.name|amp} - {$item.descr|amp}</a></li> {/foreach} so it would look like this <link>54321A - Moth wing scales</link> I need some guidance on what I need to modify to get that. |
Re: sitemap.php customization
$select[] = "$sql_tbl[products].product AS name"; // keep the line
$select[] = "$sql_tbl[products].descr AS description"; // add this then in the template refer to it as $item.decsription |
Re: sitemap.php customization
Thank you, but it doesn't work
|
Re: sitemap.php customization
Clear cart's cache
|
Re: sitemap.php customization
Thanks, found the problem, edited the wrong tpl. I wanted to edit the item_catagories_recurs.tpl, not the item_products.tpl.
Works great. |
All times are GMT -8. The time now is 12:12 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.