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

[BUG] template part Unable to load #2296

Open
chaodoing opened this issue Dec 1, 2023 · 3 comments
Open

[BUG] template part Unable to load #2296

chaodoing opened this issue Dec 1, 2023 · 3 comments
Assignees

Comments

@chaodoing
Copy link

chaodoing commented Dec 1, 2023

{{ part "head" . }} Unable to load

@kataras
Copy link
Owner

kataras commented Dec 25, 2023

Hello @chaodoing, can you please post the source code in order to be able to reproduce it?

@baiyuxiong
Copy link

https://github.com/kataras/iris/tree/main/_examples/view/template_html_5
This example can not work.
The header and body part defined by about.html can not show in the page

@baiyuxiong
Copy link

baiyuxiong commented May 9, 2024

I found the reason.
image

When project started ,getBuiltinFuncs function is called for many times with different value of name parameter.
When part function is called, The last value of name parameter is used.

For example:
getBuiltinFuncs is called twice like this:

getBuiltinFuncs("a.html")
getBuiltinFuncs("b.html")

Not matter which template is rendering, var fullPartName in "part" function will always be : b-head,

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

No branches or pull requests

3 participants