Template directory problem - no templates in context menu

Hello
I use KDE.
I have put some files in Template directory but this templates do not appear in a context menu.

Content of ~/.config/user-dirs.dirs file seems to be correct:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

Thank you for advice

Moderator edit: Fixed formatting

Hello @mkmk and welcome,

KDE, so Dolphin, needs a Desktop File here: ~/.local/share/templates/ with content like:

[Desktop Entry]
Name=MyTemplate
Comment=MyTemplate Comment
Type=Link
URL=/Path/to/template.file
Icon=text-plain

Probably this helps: https://ex-mente.com/em_blog_posts/add-your-own-create-new-options-in-kde-dolphin/

Thank you megavolt
This solved my problem.
Would be easier if it was done automatically by KDE, since “Template” directory is created by default - you just put files in it and it makes for each one a Desktop Entry file.
I will try to write a python script to do this using your indications.
Same problem goes for “Public” directory which is created on installation but nothing is automatically done - you have to configure it as any other directory.
Thank you again for your help

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.