NMS, templates and would you like

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
User avatar
Lahuindai
Forum Members
Forum Members
Posts: 66
Joined: Mon Aug 01, 2005 11:00 am

NMS, templates and would you like

Post by Lahuindai »

I just want to check here with everybody as this will have a fair impact on the project and calguy1000 does not seem to respond to email. He does however watch the forum like a hawk and is always helpfull  ;)

What i would like to know is why templates in NMS has to be different to standard templates. ie not using things like {content} and {content block='someblock'} but {$message_text} instead. Would it not make more sense to use the standard processing features that would allow for multiple content areas in the email template to do exactly what it's supposed to ?

I'm willing to implement this as i'll be doing it anyway for a project i'm working on, is this something that would be worthwhile pushing back into the main project ?

Gary
User avatar
Lahuindai
Forum Members
Forum Members
Posts: 66
Joined: Mon Aug 01, 2005 11:00 am

Re: NMS, templates and would you like

Post by Lahuindai »

Just had another thought, what if you could just bypass the whole thing and include an unpublished page from the pages section. The idea would be that you create a NMS page header and add pages to that header all marked not to show in the menu, then just use that when you send the mail run ?

What this would mean is that i can add it to the module as another type to select and not destroy the current model ....

Gary
Last edited by Lahuindai on Wed May 02, 2007 10:18 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: NMS, templates and would you like

Post by calguy1000 »

Sorry for not getting back to your email (I've just got back into town an hour or so ago).

Anyways..... NMS templates have to be different from standard page templates for a couple of (very important reasons).

a) Using a page template (probably) won't work for HTML emails.
    (everything has to be styled inline, and not use the {stylesheet} tags, or any other module tags that generate forms. 
    Most email clients would disregard/move to spam/puke on these messages

b) If using a general page template, there would be no simple and easy way to re-use the message, supply the list variables, and the member variables, etc, etc, etc.

There's probably a third reason too, I just can't think of it at the moment.  The only reason that NMS allows you to uelect a page template at all is.... well, I was asked, and paid to do it that way. :) 
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Lahuindai
Forum Members
Forum Members
Posts: 66
Joined: Mon Aug 01, 2005 11:00 am

Re: NMS, templates and would you like

Post by Lahuindai »

What about the second option as this would result in a pre formatted page and the responsibility for using "bad" parts will be the users ?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: NMS, templates and would you like

Post by calguy1000 »

the problem is still the styles, and the {stylesheet} tag.  In an HTML email, all styles need to be inlined to get the best result (works best with the most email clients).
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Lahuindai
Forum Members
Forum Members
Posts: 66
Joined: Mon Aug 01, 2005 11:00 am

Re: NMS, templates and would you like

Post by Lahuindai »

Well could that not just be a requirement (like the ($message_text}) for the template that the page is created from. For instance:

Create template
Remove {stylesheet}
Put in {literal} {/literal}
Put content blocks as required.
Save template.

Create NMS section header and hide from menu.
Add newsletter page called "01 Jan 2007"
Edit content blocks and put {$name} etc in it.

Goto NMS section and compose message
select NMS Page from type menu
Check preview below
save and continue.

I have most of this implemented as a proof of concept, just trying to figure out how to get a "preview" like in pages section...

Gary
User avatar
Lahuindai
Forum Members
Forum Members
Posts: 66
Joined: Mon Aug 01, 2005 11:00 am

Re: NMS, templates and would you like

Post by Lahuindai »

It's working, anybody interested let me know as i would like some testers. Also calguy1000 if you want to take a look let me know, this just gives you another way of doing things and does not remove any of the current functionality.

Gary
Post Reply

Return to “Developers Discussion”