mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge pull request #698 from openclassify/dia
#2256 base theme cat links are not seo friendly
This commit is contained in:
commit
4601ca0c8c
@ -7,8 +7,8 @@ return [
|
||||
'catalog_mode' => [
|
||||
'title' => 'visiosoft.theme.base::section.catalog_mode.name',
|
||||
'fields' => [
|
||||
'navigation_title', 'navigation_action', 'date_fields', 'price_fields',
|
||||
'breadcrumbs', 'ad_details', 'ad_details_tab', 'latest_and_view_all_btn',
|
||||
'home_page_sub_categories_limit', 'navigation_title', 'navigation_action', 'date_fields',
|
||||
'price_fields', 'breadcrumbs', 'ad_details', 'ad_details_tab', 'latest_and_view_all_btn',
|
||||
'register_page_instruction_logo', 'register_page_alert_link'
|
||||
],
|
||||
],
|
||||
|
||||
@ -62,6 +62,12 @@ return [
|
||||
"default_value" => "/",
|
||||
]
|
||||
],
|
||||
"home_page_sub_categories_limit" => [
|
||||
"type" => "anomaly.field_type.integer",
|
||||
"config" => [
|
||||
"default_value" => 5,
|
||||
]
|
||||
],
|
||||
'style' => [
|
||||
'type' => 'anomaly.field_type.editor',
|
||||
],
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
$('.show-all').on('click', function () {
|
||||
$(this).siblings('.hidden-category').toggleClass('hidden')
|
||||
})
|
||||
@ -10,4 +10,5 @@ return [
|
||||
'reset_password' => 'Reset Password',
|
||||
'email' => 'Email',
|
||||
'phone' => 'Phone',
|
||||
'show_all' => 'Show All',
|
||||
];
|
||||
@ -37,4 +37,7 @@ return [
|
||||
'style' => [
|
||||
'name' => 'Style(CSS)',
|
||||
],
|
||||
'home_page_sub_categories_limit' => [
|
||||
'name' => 'Homepage Sub Categories Limit',
|
||||
],
|
||||
];
|
||||
@ -0,0 +1,42 @@
|
||||
<!doctype html>
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<html class="nojs ms lt_ie7" lang="{{ config('app.locale') }}"><![endif]-->
|
||||
<!--[if IE 7]>
|
||||
<html class="nojs ms ie7" lang="{{ config('app.locale') }}"><![endif]-->
|
||||
<!--[if IE 8]>
|
||||
<html class="nojs ms ie8" lang="{{ config('app.locale') }}"><![endif]-->
|
||||
<!--[if gt IE 8]>
|
||||
<html class="nojs ms" lang="{{ config('app.locale') }}"><![endif]-->
|
||||
|
||||
<html lang="{{ config('app.locale') }}">
|
||||
|
||||
<head>
|
||||
{% include "visiosoft.theme.base::partials/metadata" %}
|
||||
{% block styles %}{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{% include "visiosoft.theme.base::partials/header" %}
|
||||
|
||||
{{ addBlock('layouts/default/section')|raw }}
|
||||
|
||||
<div>
|
||||
|
||||
{% include "visiosoft.theme.base::partials/messages" %}
|
||||
|
||||
{% if (request_path() == '/') %}
|
||||
{% include "visiosoft.theme.base::index/default" %}
|
||||
{% else %}
|
||||
{% block content %}{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{% include "visiosoft.theme.base::partials/footer" %}
|
||||
{% include "visiosoft.theme.base::partials/assets" %}
|
||||
{% include "visiosoft.theme.base::partials/settings" %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -14,6 +14,7 @@
|
||||
{{ asset_add("theme.js", "visiosoft.theme.base::js/phonefield.js") }}
|
||||
{{ asset_add("theme.js", "visiosoft.theme.base::js/jquery.inputmask.bundle.min.js") }}
|
||||
{{ asset_add("theme.js", "visiosoft.theme.base::js/lazy-loading.js") }}
|
||||
{{ asset_add("theme.js", "visiosoft.theme.base::js/script.js") }}
|
||||
|
||||
{# Theme Scripts #}
|
||||
{#{{ asset_add("theme.js", "visiosoft.theme.base::js/plugins/*") }}#}
|
||||
|
||||
@ -2,15 +2,9 @@
|
||||
|
||||
<ul class="categories-list px-0 mr-2 d-block d-sm-none">
|
||||
<li class="categories-list-li category-icon text-truncate category-{{ main_category.slug }}">
|
||||
<a href="{{ url_route('visiosoft.module.advs::list') }}?cat={{ main_category.id }}"
|
||||
class="main-category">
|
||||
{% if main_category.icon.path != "" %}
|
||||
<img src="{{ url('files/' ~ main_category.icon.path) }}" alt="{{ main_category.name }}"
|
||||
class="img-responsive">
|
||||
{% else %}
|
||||
<img src="{{ img('visiosoft.theme.base::images/default-categories-icon.png').url }}" alt="{{ main_category.name }}"
|
||||
class="img-responsive">
|
||||
{% endif %}
|
||||
<a href="{{ url_route('adv_list_seo', [main_category.slug]) }}" class="main-category">
|
||||
{% set catIcon = main_category.icon.path != "" ? url('files/' ~ main_category.icon.path) : img('visiosoft.theme.base::images/default-categories-icon.png').url %}
|
||||
<img src="{{ catIcon) }}" alt="{{ main_category.name }}" class="img-responsive">
|
||||
<span>{{ main_category.name }}</span>
|
||||
<p class="p-0 sub-categories">
|
||||
{% set sub_categories = entries('cats','category').where('parent_category_id', main_category.id).where('deleted_at', null).orderBy('sort_order').get() %}
|
||||
|
||||
@ -1,34 +1,35 @@
|
||||
{% set sub_categories_limit = setting_value('visiosoft.theme.base::home_page_sub_categories_limit') %}
|
||||
<ul class="categories-list p-0 d-none d-sm-block">
|
||||
<li class="categories-list-li category-icon category-{{ main_category.slug }}">
|
||||
{% if main_category.icon.path != "" %}
|
||||
<img src="{{ url('files/' ~ main_category.icon.path) }}" alt="{{ main_category.name }}"
|
||||
class="img-responsive">
|
||||
{% else %}
|
||||
<img src="{{ img('visiosoft.theme.base::images/default-categories-icon.png').url }}"
|
||||
alt="{{ main_category.name }}"
|
||||
class="img-responsive">
|
||||
{% endif %}
|
||||
<a href="{{ url_route('visiosoft.module.advs::list') }}?cat={{ main_category.id }}"
|
||||
class="main-category">
|
||||
{% set catIcon = main_category.icon.path != "" ? url('files/' ~ main_category.icon.path) : img('visiosoft.theme.base::images/default-categories-icon.png').url %}
|
||||
<img src="{{ catIcon }}" alt="{{ main_category.name }}" class="img-responsive">
|
||||
<a href="{{ url_route('adv_list_seo', [main_category.slug]) }}" class="main-category">
|
||||
<b>{{ main_category.name }}</b>
|
||||
</a>
|
||||
<ul class="p-0" style="">
|
||||
<ul class="p-0">
|
||||
{% set sub_categories = entries('cats','category').where('parent_category_id', main_category.id).where('deleted_at', null).orderBy('sort_order').get() %}
|
||||
{% for sub_category in sub_categories|slice(0,sub_categories_limit) %}
|
||||
<li>
|
||||
<a href="{{ url_route('visiosoft.module.advs::list') }}?cat={{ sub_category.id }}"
|
||||
class="">{{ sub_category.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% for sub_category in sub_categories|slice(sub_categories_limit,count(sub_categories)) %}
|
||||
<li class="hidden hidden-category">
|
||||
<a href="{{ url_route('visiosoft.module.advs::list') }}?cat={{ sub_category.id }}"
|
||||
class="">{{ sub_category.name }}</a>
|
||||
</li>
|
||||
{% set subCatLoop = [
|
||||
{
|
||||
'start': 0,
|
||||
'end': sub_categories_limit,
|
||||
'class': '',
|
||||
},
|
||||
{
|
||||
'start': sub_categories_limit,
|
||||
'end': count(sub_categories),
|
||||
'class': 'hidden hidden-category',
|
||||
}
|
||||
] %}
|
||||
{% for subLoop in subCatLoop %}
|
||||
{% for sub_category in sub_categories|slice(subLoop.start, subLoop.end) %}
|
||||
<li class="{{ subLoop.class }}">
|
||||
<a href="{{ url_route('adv_list_seo', [sub_category.slug]) }}">{{ sub_category.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% if count(sub_categories) > sub_categories_limit %}
|
||||
<li class="show-all">
|
||||
<li class="show-all" data-limit="{{ sub_categories_limit }}">
|
||||
<a>
|
||||
{{ trans('visiosoft.theme.base::button.show_all') }}
|
||||
<i class="fas fa-arrow-circle-down"></i>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user