-
- 24 Posts
HI:
I’m trying to put 2 jot calls on a same page with independent forms, but it duplicates the comments.
I’ve created a snippet called "jot2", created a folder called "jot2" and changed de base path in the snippet "$jotPath = $modx->config[’base_path’] . ’assets/snippets/jot2/’;" and it doesn’s work.
Any sugestions?
Thanks.
-
- 2,877 Posts
Both your snippets create/read/write the same custom fields in your database...
http://modxcms.com/forums/index.php/topic,48979.msg292608.html#msg292608
-
- 24 Posts
Thanks, it worked!!! but how can I change the templates?
The first call example:
[!Jot? &placeholders=`1` &tagid=`jot1` &output=`0 ` &tplComments=`form2`!](template file is called chunk.form2.inc.html)
[+jot.html.form.jot1+]
The second one:
[!Jot? &placeholders=`1` &tagid=`jot` &output=`0 ` &tplComments=`form`!](default template file called chunk.form.inc.html)
[+jot.html.form.jot1+]
This gives me 2 individual comments systems, but both uof them use the default "form" template.
Thanks.
-
- 2,877 Posts
use [+jot.html.form.jot+] for the second call
-
- 24 Posts
Thanks, I’ve already try that before posting, the problem now is that just display the name of the chunk in text plane:
First call: (chunck file is called chunk.form.inc.html)
[!Jot? &canmoderate=`Site Admin` &placeholders=`1` &tagid=`comentarios` &output=`0 ` &sortby=`createdon:a` &numdir=`0` &tplForm=`form`!]
[+jot.html.comments.comentarios+]
[+jot.html.navigation.comentarios+]
[+jot.html.moderate.comentarios+]
[+jot.html.form.comentarios+]
Second call: (chunck file is called chunk.form2.inc.html)
[!Jot? &canmoderate=`Site Admin` &placeholders=`1` &tagid=`email` &output=`0 ` &sortby=`createdon:a` &numdir=`0` &tplForm=`form2`!]
[+jot.html.comments.email+]
[+jot.html.navigation.email+]
[+jot.html.moderate.email+]
[+jot.html.form.email+]
Thganks for help.
-
- 2,877 Posts
paste the content of...
chunk.form.inc.html
chunk.form2.inc.html
...into modx chunks
form
form2
-
- 24 Posts
FINALLY IT WORKED¡¡¡¡¡¡ Thanks mrhaw, much apreciated.
Cheers.
-
- 2,877 Posts
With this approach you only need ONE snippet!