Master template for Mandrill - mandrill

Could you tell me if this is possible to create some master template in Mandrill or so? For example when I have many email templates where the same footer and header parts I have to copy and paste all html and only main content is different. Could I avoid this somehow by using some master template?

Related

how to display HTML files on BitBucket?

We currently use GitHub for our code repos, which include HTML files for documentation. On GitHub, the HTML files in the repo only display the HTML source, but I can publish it to GitHub Pages, where it displays as a regular web page for my users.
We have just begun the migration to BitBucket hosted within my organization. It looks like the BitBucket Pages plug-in is the equivalent to GitHub Pages, but we don't have that plug-in and I do not expect to get it. Without that plug-in, is there a way to display HTML files as a web page? We also have JIRA and Confluence, in case those help.
I currently document my Python code with pdoc (pdoc3) to create HTML documentation. I don't think this question is specific to Python or pdoc3, but I just thought I'd add that, in case it matters. (I like pdoc3, but if another tool solves my problem, I'll try it.)
In short, how do I display HTML in BitBucket without the Pages plug-in?

rubymine view html generated by erb rails

Is it possible to see the html generated by html.erb files within RubyMine? I know that I have been able to see the css.min generated by css, so there must be a similar option to be able to see the direct html generated by embedded ruby?
With your Rails server running you can right click a view template file in the project tree and select open in browser
But this is essentially the same as visiting localhost:3000/posts manually, e.g.
Rubymine can't render the view and make the necessary calls to the controller actions and database without the whole app running

put a rails collection into asset templates

I have a backbone.js front-end and Rails backend, and all my template files are in the assets directory.
I want to implement a select list in one of my templates, with the data coming from a controller.
For example, I have an AccountController and I want the user to be able to select from available accounts. Right now, I've got an AJAX request to build the accounts select list, but that isn't efficient.
Is there a way to inject my Rails data into my templates before the templates are sent to the user?
Assuming you are OK with using mustache.js to render your templates, poirot can do exactly what you're trying to do. With this you can have rails data rendered into the template before rendering the template on the front-end, and you can also use the same mustache template for both back-end and front-end. Keep it DRY yo.
Another way to solve the problem would be to name your JS files like so: example.js.erb, which allow you to render the select HTML or data directly to the JS file, and use it as needed.

Adding html form and input tags into Symfony static pages

I inherited the management of a Symfony site and need to add some HTMl form tags to one of the "static" pages via the CMS. The scenario I have is:
/index.php/splash/welcome pulls up the welcome screen.
We want to be able to add a subscription button on that page.
The HTML has been supplied for us by the company that handles the subscriptions.
The form post method has an action that references a script on a remote site (no lectures on the security implications please ;-).
When I add the <form... and <input... tags via the CMS admin panel, the tags get removed automatically by Symfony.
Is there a way to tell Symfony to allow these tags?
Thanks in advance,
Marty.
This is goign to depend completely on how the developer set up the CMS. Youre using a rich text editor in source mode i would take a look at that editor's config file and documentation because its probably the one responsible for stripping the tags.
If its just a plain text area i would check the submit action for the edit form and take a look at the code... he may be using something to strip them in there.
If youre using one of the Symfony CMS plugins (Diem, Apostrophe, Sympal) i might be able to help further if i know which one youre using. If its something custom we would need to see the code. This isnt really indiciative of the Symfony core, but rather the CMS youre using.

ASP.NET MVC ContentPlaceHolders out of order?

I added a new ContentPlaceHolder (HeadContent) right below the Title so that I can add page-specific css and js files. But when I create a new View using the master page, it puts the default text of the page layout to have the HeadContent open/close tags at the end of the page. Unfortunately, I visually just see it as the first, second and third tags and start typing in my page's html into the last tag. But this isn't the BodyContent place holder because it is the second one. I have to go back and copy/paste them into the correct place. Ugh. Just for kicks, I scrambled all the tags around in the master page just to see what would happen in the view. Sure enough, VS.NET ignores their order in the master page and reorders them the same way everytime.
Why isn't VS just ordering the place holder tags in the same order as in my master page? Actually, how do I make it stop and just do it in the order I have in my master page?
What visual studio is doing (I assume) is loading the MVC View Content Template. I assume the reason all the contents are out of order from your master page is that Visual Studio Extensiblity loads the template then adds any ContentPlaceHolders that are not in the template after the template data.
You can see what the templates look like by going to your Visual Studio file in your Program files then goto Common7\IDE\ItemTemplates\CSharp\Web\MVC2.
There is also a folder for VB. In any case you can open the zip files located in that directory and drill down till you get to the .aspx page and you'll see what VS is inserting into your project when you do a Add New/View.

Resources