Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Only suggest template files with valid template names #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
Loading
from

Conversation

JanRomero
Copy link
Contributor

@JanRomero JanRomero commented Sep 21, 2024

When using periods in template filenames, these files would be suggested in the Add Template screen. However, when you would choose such a file, say “my.template.php”, the resulting template name would become “my-template”. You would then be notified that the template lacks a file, even though you created it from ProcessWire’s file suggestion.

This PR uses the same sanitizer method templateName() to filter suggested files which is also used to sanitize template names. Before, only name() was used, which allows periods. Thus, “my.template.php” is no longer suggested.

In my case, that’s what I want anyway, because I’m using the period to denote partials related to the template.

Thank you!

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.

1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.