4.7 KiB
4.7 KiB
Custom Pages - Quick Reference Guide
🎯 Accessing the System
Admin Panel
URL: http://localhost:5000/admin/pages.html Login Required: Yes (use admin credentials)
Frontend Pages
- About: http://localhost:5000/about.html
- Contact: http://localhost:5000/contact.html
- Privacy: http://localhost:5000/privacy.html
- Dynamic: http://localhost:5000/page.html?slug=YOUR-SLUG
✏️ How to Edit Pages
Step 1: Access Admin Panel
- Navigate to
/admin/pages.html - Login if prompted
- You'll see a list of all custom pages
Step 2: Edit a Page
- Find the page you want to edit (About, Contact, or Privacy)
- Click the pencil icon (Edit button)
- Modal opens with page details loaded
Step 3: Make Changes
Use the rich text editor to format content:
- Headings: H1-H6 dropdown
- Bold/Italic: Click B or I buttons
- Lists: Bullet or numbered
- Colors: Text and background
- Links: Insert hyperlinks
- Images: Add images (optional)
Step 4: Save Changes
- Review your changes
- Toggle "Published" if needed
- Click "Save Page"
- Changes are immediately saved
Step 5: View Changes
- Open the frontend page (e.g.,
/about.html) - Refresh browser to see updates
- Content loads from database
📋 Current Pages
About Us (page-about)
- Slug:
about - Frontend:
/about.html - Sections: Our Story, What We Offer, Why Choose Us
Contact (page-contact)
- Slug:
contact - Frontend:
/contact.html - Sections: Contact Info, Business Hours
- Note: Preserves contact form below content
Privacy Policy (page-privacy)
- Slug:
privacy - Frontend:
/privacy.html - Sections: Full privacy policy with 6 main sections
🛠️ Common Tasks
Update About Page Content
- Admin Panel → Click edit on "About Us"
- Modify text in editor
- Save → Refresh
/about.html
Change Contact Information
- Admin Panel → Click edit on "Contact"
- Update phone, email, or address
- Save → Refresh
/contact.html
Update Privacy Policy
- Admin Panel → Click edit on "Privacy Policy"
- Add/modify policy sections
- Save → Refresh
/privacy.html
Create New Page
- Admin Panel → Click "Create New Page"
- Enter title (e.g., "Shipping Policy")
- Slug auto-generates (e.g., "shipping-policy")
- Add content with editor
- Save → Access at
/page.html?slug=shipping-policy
🎨 Formatting Tips
Headers for Structure
H2 for main sections (Our Story, Contact Information)
H3 for subsections (Phone, Email, Location)
Lists for Items
- Use bullet lists for features or contact methods
- Use numbered lists for steps or procedures
Links for Actions
- Make phone numbers clickable:
tel:+1234567890 - Make emails clickable:
mailto:email@example.com
Bold for Emphasis
- Use bold for important information
- Highlight key contact details
⚠️ Important Notes
-
Always Save: Changes aren't applied until you click "Save Page"
-
Published Status: Uncheck "Published" to hide page from frontend
-
Slug is URL: The slug becomes the page URL
- Example: slug
about→/about.htmlor/page.html?slug=about
- Example: slug
-
Test After Editing: Always check the frontend page after saving
-
SEO Fields: Fill in Meta Title and Meta Description for better SEO
🔍 Troubleshooting
Edit Button Not Working
- ✅ Fixed: ID escaping issue resolved
- Ensure you're logged in as admin
- Check browser console for errors
Content Not Updating
- Hard refresh browser (Ctrl+Shift+R or Cmd+Shift+R)
- Clear browser cache
- Check if page is marked as "Published"
Page Not Loading
- Verify slug matches exactly (case-sensitive)
- Check if page is active in database
- Ensure API routes are working:
/api/pages/{slug}
📊 Database Fields
Each page has:
- id: Unique identifier (e.g., "page-about")
- title: Display title ("About Us")
- slug: URL path ("about")
- content: Delta format for editor (JSON)
- pagecontent: HTML for frontend display
- metatitle: SEO title
- metadescription: SEO description
- ispublished: Visible on frontend (true/false)
- isactive: Active status (true/false)
🚀 Quick Links
- Admin Pages: /admin/pages.html
- Test Interface: /test-custom-pages.html
- About: /about.html
- Contact: /contact.html
- Privacy: /privacy.html
💾 Backup Reminder
Before making major changes:
- Test in development first
- Keep backup of important content
- Use draft mode (unpublish) to test changes
- Can always edit again if needed
Need Help? Check the detailed documentation at /docs/CUSTOM_PAGES_INTEGRATION_COMPLETE.md