I also wanted to make a suggestion regarding the input form used by NewsPublisher.
I realise you wanted to make the fields easy to reference in CSS so people can style them easily, however the problem I’ve found is that you end up with some very generic input IDs - eg #content and #pagetitle. It took me quite a while to realise that that’s why those fields looked funny in my newsPublisher instance - my CSS was referring to pre-existing divs with those exact IDs.
Maybe you could just put a np- prefix on the IDs for the input fields?
I’ve been intending to do that (and add handling for image TVs). I just haven’t had the time.
If only there were more hours in the day.
Thanks for that BobRay. In the meantime I’ve gotten away with editing the tpl for each input type and adding the prefix myseld, then updating my CSS to match.
Did you see my earlier post regarding some other problems I’m currently having with NewsPublisher?
Quote from: jono1 at Mar 06, 2011, 06:52 AM
Hi,
I’ve just started playing with NewsPublisher today and I can honestly say I think it’ll be a godsend - if I can get it working the way I want it to.
My problem seems to be that a couple of the snippet parameters have no effect. For instance, this is my snippet call:
[[!NewsPublisher? &show=`pagetitle,content` &published=`1` &initdatepicker=`0` &hidemenu=`1` &template=`Blog Post` &tinyheight=`250px`]]
I’m going for an uber-simple way for my users to add a new news item to the site. The way I’ve got things set up, the news items should always be hidden from the menu. If I leave in the GUI option for showing/hiding the resource, it seems to work OK. But I’d prefer not to leave that up to my users to remember, so I hide that option and set &hidemenu=`1` in the snippet. However, this doesn’t seem to make any difference.
Also, the Cancel button seems to appear regardless of what I set the &cancelbutton parameter to.
The other thing I’ve noticed is that if I have the RTE switched on for the content textarea, the content of the textarea is just ignored, and NewsPublisher comes back with an error saying I have to fill in that field.
Any ideas?
TBH, I don’t think I’ve tested the cancelbutton option. I’ll be doing some work on NP soon and will check that out. hidemenu has always worked when I tested it. I assume that you’re hiding it in the Manager with form customization. That may interfere with the parameter working. If so, I’m not sure there’s anything I can do about it. You might try including the hidemenu field as a hidden field in the form.
Having the RTE on with the content field required has worked fine for me, so I’m not sure what would cause that problem. Have you changed the name of that field in the Tpl chunk by any chance? As a workaround, you could use the &required parameter and just not make that a required field. It’s pretty rare for people to forget to fill that in and they can always do so later.
Duh. It’s a mistake in the tutorial. If you don’t want a cancel button, just remove it from the npOuterTpl chunk.
A new PL version was just released that fixes that issue. It still needs the fix for line 170 of assets/components/tinymce/tiny.js to get the buttons working in the front end:
Change:
Ext.getCmp('modx-panel-resource').markDirty();
to:
var pr = Ext.getCmp('modx-panel-resource');
if (pr) pr.markDirty();
I’m hopeful that a version (pl2?) with that fix in it will appear very soon.
Bob
I’ve created document called "NewsPublisher" and put the code [[!NewsPublisher]] in the Resource Content field.
Why all my posts gets differnent ID’s.
I would like that all posts will appear on my "Blog" page with id=2.
I’m newbie, what I missed, what I don’t know.
Every resource in MODx must have a different ID. It’s a requirement of the database.