Skip to content
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

Macros unnecessarily being referenced in apostrophe-templates #95

Open
abea opened this issue Jul 24, 2019 · 3 comments
Open

Macros unnecessarily being referenced in apostrophe-templates #95

abea opened this issue Jul 24, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@abea
Copy link
Contributor

abea commented Jul 24, 2019

This module reference is included in some import statements, but not all? Is it ever really necessary? In what contexts?

https://github.com/apostrophecms/apostrophe-open-museum/blob/eea3e464bb9799523d5dbc848512c62f6c87be89/lib/modules/apostrophe-search/views/empty.html#L1-L3

@abea abea added the question Further information is requested label Jul 24, 2019
@abea abea self-assigned this Jul 24, 2019
@boutell
Copy link
Contributor

boutell commented Jul 26, 2019 via email

@abea
Copy link
Contributor Author

abea commented Jul 26, 2019

That's generally what I thought. This project has these macros in the /views directory (the viewsFolderFallback), but they're referenced on some pages this way. I guess it works because the template looks for a macro in apostrophe-templates and when the file isn't there it continues up the tree and finds /views as the fallback. So this is getting to the same place an unconventional way.

What I'm generally getting then is that when the macro is not actually in lib/modules/apostrophe-templates/views then we should remove that module reference from the import statement. As an instructional project we should probably do that on Open Museum then.

Does that all sound right?

@boutell
Copy link
Contributor

boutell commented Jul 26, 2019 via email

@abea abea added bug Something isn't working and removed question Further information is requested labels Jul 26, 2019
@abea abea changed the title What's the purpose of prepending apostrophe-templates? Macros unnecessarily being referenced in apostrophe-templates Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants