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

How to use {{#each children}} and {{#each mentions.linked}}? #334

Open
Wooden-Gear opened this issue Oct 29, 2024 · 4 comments
Open

How to use {{#each children}} and {{#each mentions.linked}}? #334

Wooden-Gear opened this issue Oct 29, 2024 · 4 comments

Comments

@Wooden-Gear
Copy link

How to use {{#each children}} and {{#each mentions.linked}}?

I have no coding background at all, and even after reading the documentation, I don't know how to use these variables.
I'm requesting help from here.
Thank you!

@haouarihk
Copy link
Collaborator

{{#each children}} and {{#each mentions.linked}}
is essentially what does it do for each child then adds them together at the end

here's an example:
{{#each children}}
this child title is: {{this.title}}
{{/each}}

whatever is between {{#each children}} and {{/each}} is applied to each child.

that example prints out every child title
example response:
this child title is: accuracy
this child title is: ai systems

when you say this. in brachets, you're asking something from the child, you can ask for title, context, path ..etc

the same concept applies to {{#each mentions.linked}}

for more informations you can check this chatgpt

@Wooden-Gear
Copy link
Author

{{#each children}} 和 {{#each mentions.linked}}这基本上是它对每个子元素所做的事情,然后在最后将它们相加

 这是一个示例: {{#each 子节点}}这个子标题是:{{this.title}} {{/each}}

在{{#each children}}和{{/each}}之间的任何内容都会应用于每个子项。

那个示例打印出每个子标题 示例响应:这个子标题是:精确度这个子标题是:人工智能系统

当你这么说的时候。在括号中,你是在向子元素请求一些信息,你可以询问标题、上下文、路径等等。

相同的概念适用于{{#each mentions.linked}}

对于更多信息,你可以查看这个 ChatGPT

Thank you for your guidance! But I still can't use it. I'm about to cry from how stupid I am.

image

The linkde is Empty.

The following are the output results:

image

@haouarihk
Copy link
Collaborator

image
there looks to be a space after the "." before title, content and linked

@Wooden-Gear
Copy link
Author

image there looks to be a space after the "." before title, content and linked

I tried removing the spaces, but it didn't work.

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

2 participants