Merge pull request #3623 from shubhwebkul/patch-3
dynamic header content count added in velocity
This commit is contained in:
commit
dc78fe6c3a
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddHeaderContentCountVelocityMetaDataTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('velocity_meta_data', function (Blueprint $table) {
|
||||
$table->text('header_content_count');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('velocity_meta_data', function (Blueprint $table) {
|
||||
$table->dropColumn('header_content_count');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -20,6 +20,7 @@ class VelocityMetaDataSeeder extends Seeder
|
|||
'locale' => 'en',
|
||||
|
||||
'home_page_content' => "<p>@include('shop::home.advertisements.advertisement-four')@include('shop::home.featured-products') @include('shop::home.product-policy') @include('shop::home.advertisements.advertisement-three') @include('shop::home.new-products') @include('shop::home.advertisements.advertisement-two')</p>",
|
||||
'header_content_count' => "5",
|
||||
'footer_left_content' => __('velocity::app.admin.meta-data.footer-left-raw-content'),
|
||||
|
||||
'footer_middle_content' => '<div class="col-lg-6 col-md-12 col-sm-12 no-padding"><ul type="none"><li><a href="https://webkul.com/about-us/company-profile/">About Us</a></li><li><a href="https://webkul.com/about-us/company-profile/">Customer Service</a></li><li><a href="https://webkul.com/about-us/company-profile/">What’s New</a></li><li><a href="https://webkul.com/about-us/company-profile/">Contact Us </a></li></ul></div><div class="col-lg-6 col-md-12 col-sm-12 no-padding"><ul type="none"><li><a href="https://webkul.com/about-us/company-profile/"> Order and Returns </a></li><li><a href="https://webkul.com/about-us/company-profile/"> Payment Policy </a></li><li><a href="https://webkul.com/about-us/company-profile/"> Shipping Policy</a></li><li><a href="https://webkul.com/about-us/company-profile/"> Privacy and Cookies Policy </a></li></ul></div>',
|
||||
|
|
|
|||
|
|
@ -129,6 +129,11 @@ class ContentRepository extends Repository
|
|||
{
|
||||
$query = $this->model::orderBy('position', 'ASC');
|
||||
|
||||
$velocityMetaData = app('Webkul\Velocity\Helpers\Helper')->getVelocityMetaData();
|
||||
$headerContentCount = $velocityMetaData->header_content_count;
|
||||
|
||||
$headerContentCount = $headerContentCount != '' ? $headerContentCount : 5;
|
||||
|
||||
$contentCollection = $query
|
||||
->select(
|
||||
'velocity_contents.content_type',
|
||||
|
|
@ -140,7 +145,7 @@ class ContentRepository extends Repository
|
|||
->leftJoin('velocity_contents_translations', 'velocity_contents.id', 'velocity_contents_translations.content_id')
|
||||
->distinct('velocity_contents_translations.id')
|
||||
->where('velocity_contents_translations.locale', app()->getLocale())
|
||||
->limit(5)
|
||||
->limit($headerContentCount)
|
||||
->get();
|
||||
|
||||
$formattedContent = [];
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ return [
|
|||
'footer-left-content' => 'تذييل يسار المحتوى',
|
||||
'subscription-content' => 'محتوى شريط الاشتراك',
|
||||
'sidebar-categories' => 'فئات الشريط الجانبي',
|
||||
'header_content_count' => 'Header Content Count',
|
||||
'footer-left-raw-content' => '<p>نحن نحب صياغة البرامج وحل مشاكل العالم الحقيقي مع الثنائيات. نحن ملتزمون للغاية بأهدافنا. نحن نستثمر مواردنا لإنشاء برامج وتطبيقات سهلة الاستخدام على مستوى عالمي للأعمال التجارية مع أرفع مستوى ، على أعلى مستوى من الخبرة التقنية.</p>',
|
||||
'slider-path' => 'مسار المنزلق',
|
||||
'category-logo' => 'شعار الفئة',
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ return [
|
|||
'home-page-content' => 'Inhalt der Startseite',
|
||||
'footer-left-content' => 'Fußzeile Linker Inhalt',
|
||||
'subscription-content' => 'Abonnementleiste Inhalt',
|
||||
'header_content_count' => 'Header Content Count',
|
||||
'sidebar-categories' => 'Seitenleisten-Kategorien',
|
||||
'footer-left-raw-content' => '<p>Wir lieben es, Software zu erstellen und die Probleme der realen Welt mit den Binärdateien zu lösen. Wir fühlen uns unseren Zielen sehr verpflichtet. Wir investieren unsere Ressourcen, um benutzerfreundliche Software und Anwendungen von Weltklasse für das Unternehmensgeschäft mit erstklassiger Technologie zu entwickeln.</p>',
|
||||
'slider-path' => 'Slider Pfad',
|
||||
|
|
|
|||
|
|
@ -90,27 +90,28 @@ return [
|
|||
]
|
||||
],
|
||||
'meta-data' => [
|
||||
'footer' => 'Footer',
|
||||
'title' => 'Velocity meta data',
|
||||
'activate-slider' => 'Activate Slider',
|
||||
'home-page-content' => 'Home Page Content',
|
||||
'footer-left-content' => 'Footer Left Content',
|
||||
'subscription-content' => 'Subscription bar Content',
|
||||
'sidebar-categories' => 'Sidebar Categories',
|
||||
'footer-left-raw-content' => '<p>We love to craft softwares and solve the real world problems with the binaries. We are highly committed to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.</p>',
|
||||
'slider-path' => 'Slider Path',
|
||||
'category-logo' => 'Category logo',
|
||||
'product-policy' => 'Product Policy',
|
||||
'update-meta-data' => 'Update Meta Data',
|
||||
'product-view-image' => 'Product View Image',
|
||||
'advertisement-two' => 'Advertisement Two Images',
|
||||
'advertisement-one' => 'Advertisement One Images',
|
||||
'footer-middle-content' => 'Footer Middle Content',
|
||||
'advertisement-four' => 'Advertisement Four Images',
|
||||
'advertisement-three' => 'Advertisement Three Images',
|
||||
'images' => 'Images',
|
||||
'general' => 'General',
|
||||
'add-image-btn-title' => 'Add Image'
|
||||
'footer' => 'Footer',
|
||||
'title' => 'Velocity meta data',
|
||||
'activate-slider' => 'Activate Slider',
|
||||
'home-page-content' => 'Home Page Content',
|
||||
'footer-left-content' => 'Footer Left Content',
|
||||
'subscription-content' => 'Subscription bar Content',
|
||||
'sidebar-categories' => 'Sidebar Categories',
|
||||
'header_content_count' => 'Header Content Count',
|
||||
'footer-left-raw-content' => '<p>We love to craft softwares and solve the real world problems with the binaries. We are highly committed to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.</p>',
|
||||
'slider-path' => 'Slider Path',
|
||||
'category-logo' => 'Category logo',
|
||||
'product-policy' => 'Product Policy',
|
||||
'update-meta-data' => 'Update Meta Data',
|
||||
'product-view-image' => 'Product View Image',
|
||||
'advertisement-two' => 'Advertisement Two Images',
|
||||
'advertisement-one' => 'Advertisement One Images',
|
||||
'footer-middle-content' => 'Footer Middle Content',
|
||||
'advertisement-four' => 'Advertisement Four Images',
|
||||
'advertisement-three' => 'Advertisement Three Images',
|
||||
'images' => 'Images',
|
||||
'general' => 'General',
|
||||
'add-image-btn-title' => 'Add Image'
|
||||
],
|
||||
'category' => [
|
||||
'save-btn-title' => 'Save Menu',
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ return [
|
|||
'footer-left-content' => 'بالا و پایین صفحه',
|
||||
'subscription-content' => 'نوار اشتراک محتوا',
|
||||
'sidebar-categories' => 'دسته بندی های نوار کناری',
|
||||
'header_content_count' => 'Header Content Count',
|
||||
'footer-left-raw-content' => '<p>ما دوست داریم که نرم افزارهایی را تهیه کرده و مشکلات دنیای واقعی را با باینری حل کنیم. ما به اهداف خود بسیار متعهد هستیم. ما منابع خود را برای ایجاد کلاس های نرم افزاری و برنامه های کاربردی برای تجارت سازمانی با درجه برتر ، در لبه تخصص فناوری سرمایه گذاری می کنیم..</p>',
|
||||
'slider-path' => 'مسیر کشویی',
|
||||
'category-logo' => 'آرم دسته',
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ return [
|
|||
'footer-left-content' => 'Contenuti Footer Sinistra',
|
||||
'subscription-content' => 'Conenuti Subscription bar',
|
||||
'sidebar-categories' => 'Categorie Sidebar',
|
||||
'header_content_count' => 'Header Content Count',
|
||||
'footer-left-raw-content' => '<p>Ci piace personalizzare software e risolvere problemi del mondo reale. Siamo fortemente to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.</p>',
|
||||
'slider-path' => 'Percorso Slider',
|
||||
'category-logo' => 'Logo Categoria',
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ return [
|
|||
'footer-left-content' => 'Inhoud voettekst links',
|
||||
'subscription-content' => 'Abonnementsbalk Inhoud',
|
||||
'sidebar-categories' => 'Sidebar categorieën',
|
||||
'header_content_count' => 'Header Content Count',
|
||||
'footer-left-raw-content' => '<p>We houden ervan om software te maken en de echte wereldproblemen met de binaire bestanden op te lossen. We zijn zeer toegewijd aan onze doelen. We investeren onze middelen om gebruiksvriendelijke software en applicaties van wereldklasse te creëren met de allerbeste, geavanceerde technologie-expertise.</p>',
|
||||
'slider-path' => 'Schuifpad',
|
||||
'category-logo' => 'Category logo',
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ return [
|
|||
'footer-left-content' => 'Zawartość lewejstrony stopki',
|
||||
'subscription-content' => 'Treść paska subskrypcji',
|
||||
'sidebar-categories' => 'kategorie paska bocznego',
|
||||
'header_content_count' => 'Header Content Count',
|
||||
'footer-left-raw-content' => '<p>Uwielbiamy tworzyć oprogramowanie i rozwiązywać rzeczywiste problemy z plikami binarnymi. Jesteśmy bardzo zaangażowani w realizację naszych celów. Inwestujemy olbrzymie zasoby w tworzenie światowej klasy łatwego w użyciu oprogramowania oraz aplikacji dla firm oraz użytkowników prywatnych , w oparciu o najnowszą wiedzę technologiczną</p>',
|
||||
'slider-path' => 'Ścieżka Slidera (suwaka)',
|
||||
'category-logo' => 'Logo kategorii',
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ return [
|
|||
'footer-left-content' => 'Conteúdo Rodapé Esquerdo',
|
||||
'subscription-content' => 'Conteúdo da Barra de Inscrição',
|
||||
'sidebar-categories' => 'Sidebar Categories',
|
||||
'header_content_count' => 'Header Content Count',
|
||||
'footer-left-raw-content' => '<p>We love to craft softwares and solve the real world problems with the binaries. We are highly committed to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.</p>',
|
||||
'slider-path' => 'Caminho do Slider',
|
||||
'category-logo' => 'Logo da Categoria',
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ return [
|
|||
'footer-left-content' => 'Alt Sol İçeriği',
|
||||
'subscription-content' => 'Abonelik Çubuğu İçeriği',
|
||||
'sidebar-categories' => 'Yan Kategoriler',
|
||||
'header_content_count' => 'Header Content Count',
|
||||
'footer-left-raw-content' => '<p>Yazılımlar üretmeyi ve dünyada karşılaştığımız sorunları bu şekilde çözmeyi çok seviyoruz. Hedeflerimize büyük önem veriyor, en iyi olduğumuz teknoloji uzmanlığı ile kurumsal işleriniz için birin sınıf kullanıcı dostu yazılım ve uygulamalar oluşturmak için kaynaklarımıza yatırım yapıyoruz.</p>',
|
||||
'slider-path' => 'Slider Yolu',
|
||||
'category-logo' => 'Kategori Logosu',
|
||||
|
|
|
|||
|
|
@ -78,6 +78,17 @@
|
|||
value="{{ $metaData ? $metaData->sidebar_category_count : '10' }}" />
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{ __('velocity::app.admin.meta-data.header_content_count') }}</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="control"
|
||||
id="header_content_count"
|
||||
name="header_content_count"
|
||||
value="{{ $metaData ? $metaData->header_content_count : '5' }}" />
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{ __('shop::app.home.featured-products') }}</label>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue