category

Michael

Administrator
Staff member
Hey, guy, I have a larval script website-
You do not have permission to view link Log in or register now.


I want Add Text Only This Category-
You do not have permission to view link Log in or register now.


But In the category.blade.php If someone adds text only then they start showing in all categories.
The category.blade.php is the code/structure for all category pages. That's the reason why it will display the text on all pages.

To display any text in a specific category I would suggest to give the text a if statement to check if it's the current category. You could do that with a route check for the specific URL. ;)

Do you need any exact code example? ;)
 

Michael

Administrator
Staff member
Do i send This Code
If you like, send me your category.blade.php with the text.

But basically you only have to put that inside your code:
PHP:
{{ Request::path() == 'category/cb-background' ? '<p>Some Text to display</p>' : '' }}
Change category/cb-background to something else to apply the text to some other pages.
 

cbeditx

New member
@extends('app')

@section('title'){{ $category->name.' - ' }}@endsection

@section('content')
<div class="jumbotron md index-header jumbotron_set jumbotron-cover">
<div class="container wrap-jumbotron position-relative">
<h1 class="title-site title-sm">{{ $category->name }}</h1>


@if( $images->total() != 0 )
<p class="subtitle-site"><strong>({{number_format($images->total())}}) {{trans_choice('misc.images_available_category',$images->total() )}}</strong></p>
@else
<p class="subtitle-site"><strong>{{$settings->title}}</strong></p>
@endif
</div>
</div>

<div class="container margin-bottom-40">

<!-- Col MD -->
<div class="col-md-12 margin-top-20 margin-bottom-20">

@if( $images->total() != 0 )

<div id="imagesFlex" class="flex-images btn-block margin-bottom-40 dataResult">
@include('includes.images')


@if( $images->count() != 0 )
<div class="container-paginator">
{{ $images->links() }}
</div>
@endif

</div><!-- Image Flex -->



@else
<div class="btn-block text-center">
<i class="icon icon-Picture ico-no-result"></i>
</div>

<h3 class="margin-top-none text-center no-result no-result-mg">
{{ trans('misc.no_results_found') }}
</h3>
@endif

</div><!-- /COL MD -->

</div><!-- container wrap-ui -->

@endsection

@section('javascript')

<script type="text/javascript">

$('#imagesFlex').flexImages({ rowHeight: 220 });

//<<---- PAGINATION AJAX
$(document).on('click','.pagination a', function(e){
e.preventDefault();
var page = $(this).attr('href').split('page=')[1];
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url: '{{ url("/") }}/ajax/category?slug={{$category->slug}}&page=' + page


}).done(function(data){
if( data ) {

scrollElement('#imagesFlex');

$('.dataResult').html(data);

$('.hovercard').hover(
function () {
$(this).find('.hover-content').fadeIn();
},
function () {
$(this).find('.hover-content').fadeOut();
}
);

$('#imagesFlex').flexImages({ rowHeight: 220 });
jQuery(".timeAgo").timeago();

$('[data-toggle="tooltip"]').tooltip();
} else {
sweetAlert("{{trans('misc.error_oops')}}", "{{trans('misc.error')}}", "error");
}
//<**** - Tooltip
});

});//<<---- PAGINATION AJAX
</script>


@endsection
 

cbeditx

New member
Hey
Michael

I think this will work with MySQL

You Also Check This Site-
You do not have permission to view link Log in or register now.


This website is also made of the same script

category.blade.php-
You do not have permission to view link Log in or register now.


Mysql code-
You do not have permission to view link Log in or register now.


Category.php-https://drive.google.com/open?id=1ikAF9HKr0yujf4PZPNudOI9KgP8HTc4D
 

Attachments

cbeditx

New member
Hey, guy, I have a larval script website-https://cb.cbeditz.com/

I want to Add Some Paragraph Text Only This Category-
You do not have permission to view link Log in or register now.


But In the category.blade.php If someone adds text only then they start showing in all categories.

Like this-https://morepng.com/category/cb-background

My Code

id -2

Name- 100 cb background

Slug- cb-background

You do not have permission to view link Log in or register now.


You do not have permission to view link Log in or register now.


You do not have permission to view link Log in or register now.
 
Top