Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 30, 2025

Implements the ability to duplicate blog entries with all content and CMS structure, addressing the user request for copying posts instead of rebuilding them from scratch.

Changes

  • List view: Added "Duplicate" action to blog entry context menu
  • Duplication logic: Deep copies blog entry including CMS page (sections, blocks, slots), categories, tags, and media
  • Smart defaults: Duplicated entries are inactive with publishedAt set to null, title appended with "(Copy)", and auto-generated slug
  • Translations: Added German and English strings for duplicate action and notifications

Implementation

async onDuplicate(blogEntry) {
    // Load full entry with CMS structure
    const fullBlogEntry = await this.blogEntryRepository.get(blogEntry.id, Context.api, criteria);
    
    // Clone CMS page structure
    const clonedSections = cloneDeep(originalPage.sections);
    // Remove IDs to force new entity creation
    
    // Create new inactive entry
    newBlogEntry.active = false;
    newBlogEntry.publishedAt = null;
    newBlogEntry.title = `${fullBlogEntry.title} (Copy)`;
}

After duplication, users are automatically redirected to the editor to customize the copied entry.

Original prompt

This section details on the original issue you should resolve

<issue_title>Feature Requests: Blogbeitrag kopieren oder CMS-Seiten-Vorlage</issue_title>
<issue_description>Hallo,

wir fänden es super hilfreich, wenn man Beiträge kopieren könnte, damit man neue Beiträge nicht immer von Grund auf neu aufbauen muss. Alternativ könnte man auch mit einer CMS-Seite arbeiten, die als "Vorlage" genutzt wird, in der man sich die Sections usw. vorbereitet anlegen kann. Diese wird dann beim Erstellen eines neuen Beitrages als Gerüst genutzt. Ist aber vermutlich schwieriger umzusetzen, als eine Kopierfunktione an den Beiträgen.

Ist sowas schon in Planung?

Liebe Grüße
Dayana</issue_description>

Comments on the Issue (you are @copilot in this section)

@7underlines See also https://github.com//discussions/28

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add copy functionality for blog posts Add blog entry duplication feature Dec 30, 2025
Copilot AI requested a review from 7underlines December 30, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Requests: Blogbeitrag kopieren oder CMS-Seiten-Vorlage

2 participants