TheMainStreamer
Member
Hey, guys,
I have a little problem right now.....
I tried to add a new field to "nodes" in the admin interface, so that I can write something into a text box and use it as a variable for each category/forum.
Adding a new field wasn't that hard. I simply created a macro for the new field "background" in the
and then linked this macro in the
. So the first step was taken. Now an error message appeared, which I could fix by adding a "background" function into the
Everything now looks as if it could work, but the text I enter in the field does not save itself. This is also relatively logical, since no new entry has been created in the database. After several tests, this error message appeared:
I think the problem seems to be that no new field was created in the database....
Can you give me a hint what I did wrong or what I have to add in order for the field to appear in the database?
Thank you!
Justus
I have a little problem right now.....
I tried to add a new field to "nodes" in the admin interface, so that I can write something into a text box and use it as a variable for each category/forum.
Adding a new field wasn't that hard. I simply created a macro for the new field "background" in the
"node_edit_macros"
template
HTML:
<xf:macro name="background" arg-node="!">
<xf:textboxrow name="node[background]" value="{$node.background}" label="{{ phrase('node_background') }}" />
</xf:macro>
"forum_edit"
template
HTML:
<xf:macro template="node_edit_macros" name="background" arg-node="{$node}" />
"Node.php"
which is in the path /src/XF/Entity/
.Everything now looks as if it could work, but the text I enter in the field does not save itself. This is also relatively logical, since no new entry has been created in the database. After several tests, this error message appeared:
I think the problem seems to be that no new field was created in the database....
Can you give me a hint what I did wrong or what I have to add in order for the field to appear in the database?
Thank you!
Justus