Navigation menu
Sobiech 77
From: -
From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: Navigation menu
Sobiech
OP
77
From: -
From: -
Thank you very much. It works great!
1 Re: Navigation menu
Philipp
From: Austria
Administrator
1342From: Austria
1) Restore the old files_categories_nav template
2) Open /modules/files/filescategories.php in an editor and replace (around line 76):
with:
2) Open /modules/files/filescategories.php in an editor and replace (around line 76):
$query = $database -> dbquery( "SELECT filecat_id, filecat_name, filecat_seo, filecat_description, filecat_keywords FROM " . DB_PREFIX . "esselbach_ct_filescats WHERE filecat_id IN (" . $parents . "," . $id . ") AND (filecat_website = '0' OR filecat_website = '" . $preferences[ 'current_website' ] . "') ORDER BY filecat_position, filecat_parentcat, filecat_id" );
while( list( $filecat_id, $filecat_name, $filecat_seo, $filecat_description, $filecat_keywords ) = $database -> dbrow( $query ) )
{
$insert[ 'filecat_id' ] = $filecat_id;
$insert[ 'filecat_name' ] = htmlspecialchars( $filecat_name );
$insert[ 'filecat_seo' ] = $filecat_seo;
$insert[ 'filecat_description' ] = htmlspecialchars( $filecat_description );
$insert[ 'files_categories_nav' ] .= $templates -> exectemplate( $main_templates[ 'files_categories_nav_html' ], $main_templates[ 'files_categories_nav_php' ], $insert );
$insert[ 'page_name' ] = $insert[ 'filecat_name' ];
$insert[ 'page_description' ] = $insert[ 'filecat_description' ];
$insert[ 'page_keywords' ] = htmlspecialchars( $filecat_keywords );
}
with:
$query = $database -> dbquery( "SELECT filecat_id, filecat_name, filecat_seo, filecat_description, filecat_keywords, filecat_parentcat FROM " . DB_PREFIX . "esselbach_ct_filescats WHERE filecat_id IN (" . $parents . "," . $id . ") AND (filecat_website = '0' OR filecat_website = '" . $preferences[ 'current_website' ] . "') ORDER BY filecat_position, filecat_parentcat, filecat_id" );
$categories = $database -> dbrows( $query );
while( list( $filecat_id, $filecat_name, $filecat_seo, $filecat_description, $filecat_keywords, $parent ) = $database -> dbrow( $query ) )
{
$insert[ 'filecat_id' ] = $filecat_id;
$insert[ 'filecat_name' ] = htmlspecialchars( $filecat_name );
$insert[ 'filecat_seo' ] = $filecat_seo;
$insert[ 'filecat_description' ] = htmlspecialchars( $filecat_description );
$insert[ 'files_categories_nav' ] .= ( ( $categories > 1 and $parent ) or ( $categories == 1 ) ) ? " » " . $insert['filecat_name'] : $templates -> exectemplate( $main_templates[ 'files_categories_nav_html' ], $main_templates[ 'files_categories_nav_php' ], $insert );
$insert[ 'page_name' ] = $insert[ 'filecat_name' ];
$insert[ 'page_description' ] = $insert[ 'filecat_description' ];
$insert[ 'page_keywords' ] = htmlspecialchars( $filecat_keywords );
}
<div class="navigation">
<a href="https://www.contentteller.com//">sitename</a> »
<a href="https://www.contentteller.com/files/categories">Files Categories</a> »
<a href="https://www.contentteller.com/files/categories/name-of-parent-category.html">name-of-parent-category</a>
</div>
So I can replace (in template files_categories_nav):
with:
and then navigation menu it looks like that:
<div class="navigation">
<a href="https://www.contentteller.com//">sitename</a> »
<a href="https://www.contentteller.com/files/categories">Files Categories</a> »
name-of-parent-category
</div>
After this change, Google better interprets breadcrumb.
--------
But when I go to category (for example: files/categories/name-of-category.html), navigation menu looks like that:
<div class="navigation">
<a href="https://www.contentteller.com//">sitename</a> »
<a href="https://www.contentteller.com/files/categories">Files Categories</a> »
<a href="https://www.contentteller.com/files/categories/name-of-parent-category.html">name-of-parent-category</a> »
<a href="https://www.contentteller.com/files/categories/name-of-category.html">name-of-category</a>
</div>
or after my change:
<div class="navigation">
<a href="https://www.contentteller.com//">sitename</a> »
<a href="https://www.contentteller.com/files/categories">Files Categories</a> »
name-of-parent-category »
name-of-category
</div>
...
Is it possible to make this menu to look like this:
<div class="navigation">
<a href="https://www.contentteller.com//">sitename</a> »
<a href="https://www.contentteller.com/files/categories">Files Categories</a> »
<a href="https://www.contentteller.com/files/categories/name-of-parent-category.html">name-of-parent-category</a> »
name-of-category
</div>
?