@extends('backend.layouts.app') @section('title', $rule ? 'Edit Theme Rule' : 'Create Theme Rule') @push('styles') @endpush @section('content') @php $pageTitle = $rule ? 'Edit Theme Rule' : 'Create Theme Rule'; $indexRoute = 'theme-rule.index'; $indexLabel = 'Theme Rules'; @endphp @include('backend.layouts.partials._page_header')
@csrf @if($rule) @method('PUT') @endif

Rule Information

@error('rule_name')

{{ $message }}

@enderror
@error('rule_description')

{{ $message }}

@enderror

Use @{{param_name}} as placeholders. These will be replaced with actual values from theme settings.

Click to open code editor

@error('rule_content')

{{ $message }}

@enderror

Define the parameters used in your CSS template as @{{param_name}} placeholders.

@php $existingParams = $rule ? ($rule->rule_params ?? []) : []; $oldNames = old('param_name', []); $oldDefaults = old('param_default', []); $oldTypes = old('param_type', []); $hasOld = !empty($oldNames); @endphp @if($hasOld) @foreach($oldNames as $i => $name)
@endforeach @elseif(count($existingParams) > 0) @foreach($existingParams as $param)
@endforeach @endif
Cancel
@endsection {{-- Editor Modal --}} @push('scripts') @endpush