-
- 4 Posts
Hello Bob,
I am using Modx 2.2.5-pl, News Publisher 1.4.1-rc
I created a document named NewsPublisher,
Input content as below and saved:
[ [ !NewsPublisher?
&initrte='1'
&rtcontent='1'
&template='2'
] ]
(please ignore the space as if not these code will not show in this post.)
the above set &template=2 means the template ID=2, named "NewsPublisherBaseTemplate"
When I visit the NewsPublisher form page, it shows an error:
Sorry . . . There were one or more problems in producing the form:
Failed to get template: .2
I try to set &template='1' or &template='NewsPublisherBaseTemplate', it doesn't work either.
While I do not use the &template property, the NewsPublisher form page works fine.
-----------------
Another thing,
I set the NewsPublisher template as "NewsPublisherBaseTemplate" which the template id is 2" in the back end.
when I view the NewsPublisher form page (without set &template property) and submit a post, then visit the post, I found that the new post use the system default template "BaseTemplate" rather then use the "NewsPublisherBaseTemplate" which the template id is 2 (That means the new post do not followed the "NewsPublisher" document's template).
How can I do to make the new submitted post use my template rather then the BaseTemplate?
Waiting for your kindly reply.
Thanks!
Jacky
-
- 24,544 Posts
You want backticks ( ` ), not single quotes around the property values.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
-
- 4 Posts
Hi Rob,
Thanks very much for your quick reply!
I solved this problem by chance today. What I do is as below:
===================
[ [ !NewsPublisher?
&initrte=`1`
&rtcontent=`1`
&template=`2` ] ]
===================
(please ignore the space as if not these code will not showing correctly in this post.)
What I changed: the 2 square brackets at the end is just following the `2` and in the same line, do not change to the next line. this solved the problem.
Why this happened? I guess the NewsPublisher want some clean codes as shown here, but because of the Tinymce used, the NewsPublisher may get some Wrong codes.
Can this be solved in the next version of Modx or NewsPublisher or Tinymce?
Indeed, use backticks ( ` ) rather than single quotes is important also, although this not meet my problem here.
Thanks again for your help, Rob.
------------
By the way, I do use backticks in my modx website and in this post, they are been turned to single quotes when I post here.
Is this an issue? can this be solved?
Jacky
Code will display very nicely in a forum post if you use the code tags supplied by the < > button in the post editing toolbar.
[[!NewsPublisher?
&initrte=`1`
&rtcontent=`1`
&template=`2` ]]
TinyMCE can be a real problem. I seldom use it, since I've been using HTML 5 extensively for years now, and TinyMCE will remove any HTML 5 tags, besides its usual annoying tendency to add block-level tags and convert characters.
-
- 4 Posts
Is there any good alternative of TinyMCE on Modx?
The only thing I miss from TinyMCE is the image and link insertion. There are no other add-ons to fill those functions.