@php $page->section ??= []; @endphp @extends('layouts.app') @section('content')
@if ($errors->any()) @endif
{{ html()->modelForm($page, 'PUT')->route('page.updateContent', $page->id)->class('needs-validation')->attributes(['novalidate'])->open() }}
{{ html()->label('Title')->class('form-label')->for('title') }} {{ html()->span('*')->class('text-danger') }} {{ html()->text('title')->class('form-control bg-primary-subtle')->isReadonly(true) }}
{{ html()->label('Description (Short)')->class('form-label')->for('short_description') }} {{ html()->textarea('short_description')->class('form-control')->placeholder('Enter Description (Short)')->rows(5) }}
{{ html()->label('Description')->class('form-label')->for('description') }} {{ html()->textarea('description')->class('form-control ckeditor-classic') }}
@if ($page->type == 'page')
URL Generator
{{ html()->label('Parent(Optional)')->class('form-label')->for('parent_slug') }} {{ html()->text('parent_slug')->class('form-control') }}
{{ html()->label('Slug')->class('form-label')->for('slug') }} {{ html()->span('*')->class('text-danger') }} {{ html()->text('slug')->class('form-control')->placeholder('Page Slug')->required() }}
@endif @if (in_array('custom-field-section', $page->section)) @endif @if (in_array('meta-section', $page->section))
Meta
{{ html()->label('Meta Title')->class('form-label')->for('meta_title') }} {{ html()->text('meta_title')->class('form-control mb-3')->placeholder('Meta Title') }}
{{ html()->label('Meta Keywords')->class('form-label')->for('meta_keywords') }} {{ html()->textarea('meta_keywords')->class('form-control mb-3')->placeholder('Meta Keywords') }}
{{ html()->label('Meta Description')->class('form-label')->for('meta_description') }} {{ html()->textarea('meta_description')->class('form-control mb-3')->placeholder('Meta Description')->rows(3) }}
@endif
Published
{{ html()->label('Status')->class('form-label visually-hidden')->for('status') }} {{ html()->select('status', config('constants.page_status_options'))->value($page->status ?? old('status'))->class('form-select choices-select')->required() }}
@if ($page->type == 'page')
Template
{{ html()->label('Template')->class('form-label visually-hidden')->for('template') }} {{ html()->select('template', getPageTemplateOptions())->class('form-select choices-select')->value($page->template ?? old('template'))->placeholder('Select')->required() }}
@endif @if ($page->type == "widget")
Page Attributes
{{ html()->label('Parent Page')->class('form-label')->for('parent_id') }} {{ html()->span('*')->class('text-danger') }} {{ html()->multiselect('parent_id', $pageOptions ?? [], $page->parents()->pluck('parent_page_id') ?? null)->class('form-select choices-select')->attributes(['multiple'])->required() }}
@endif @if (in_array('featured-image-section', $page->section)) @endif @if (in_array('media-gallery-section', $page->section)) @endif @if (in_array('link-section', $page->section))
Youtube Link
{{ html()->textarea('link')->class('form-control')->rows(3)->placeholder('Enter Youtube Link or Iframe') }}
@endif @if (in_array('sidebar-section', $page->section)) @endif @if (in_array('button-section', $page->section))
Button
{{ html()->label('Text')->class('form-label')->for('button_text') }} {{ html()->span('*')->class('text-danger') }} {{ html()->text('button_text')->class('form-control')->required() }}
{{ html()->label('Link')->class('form-label')->for('button_url') }} {{ html()->span('*')->class('text-danger') }} {{ html()->text('button_url')->class('form-control')->placeholder('Button Link')->required() }}
{{ html()->label('Target')->class('form-label')->for('button_target') }} {{ html()->span('*')->class('text-danger') }} {{ html()->select('button_target', config('constants.redirect_options'))->class('form-select choices-select')->required() }}
@endif
{{ html()->closeModelForm() }}
@include('ccms::page.modal.edit') @endsection