This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

Navigation menu


avatar
Sobiech 77
From: -
When I go to the file parent category (for example: files/categories/name-of-parent-category.html), navigation menu looks like that:

<div class="navigation">
<a href="https://www.contentteller.com//">sitename</a> &#187;
<a href="https://www.contentteller.com/files/categories">Files Categories</a> &#187;
<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):
&#187; <a href="https://www.contentteller.com/index.php{$insert['param_ct']}files{$insert['param_action']}categories{$insert['param_page']}{$insert['filecat_seo']}.html">{$insert['filecat_name']}</a>


with:
 &#187; {$insert['filecat_name']}


and then navigation menu it looks like that:

<div class="navigation">
<a href="https://www.contentteller.com//">sitename</a> &#187;
<a href="https://www.contentteller.com/files/categories">Files Categories</a> &#187;
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> &#187;
<a href="https://www.contentteller.com/files/categories">Files Categories</a> &#187;
<a href="https://www.contentteller.com/files/categories/name-of-parent-category.html">name-of-parent-category</a> &#187;
<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> &#187;
<a href="https://www.contentteller.com/files/categories">Files Categories</a> &#187;
name-of-parent-category &#187;
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> &#187;
<a href="https://www.contentteller.com/files/categories">Files Categories</a> &#187;
<a href="https://www.contentteller.com/files/categories/name-of-parent-category.html">name-of-parent-category</a> &#187;
name-of-category
</div>

?

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: Navigation menu
avatar
OP 77
From: -
Thank you very much. It works great!
1 Re: Navigation menu
avatar
Administrator
1340
From: Vienna, Austria
1) Restore the old files_categories_nav template

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 ) ) ? " &#187; " . $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 );
}

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.