Simplenews default body content ofr content
daily materio html template through hook_form_alter
This commit is contained in:
parent
100abc9a3a
commit
4d0605604f
@ -36,3 +36,23 @@ function materio_admin_menu_alter(&$items){
|
||||
# deactivate default home page
|
||||
$items['node']['access callback'] = FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Implements hook_form_alter().
|
||||
*/
|
||||
function materio_admin_form_simplenews_node_form_alter(&$form, &$form_state, $form_id) {
|
||||
// dsm($form_id, '$form_id');
|
||||
// dsm($form_state, '$form_state');
|
||||
// dsm($form, '$form');
|
||||
if(!$form['nid']['#value']){
|
||||
$form['body']['und'][0]['#default_value'] = materio_admin_getSimplenewsNodBodyTemplate();
|
||||
$form['body']['und'][0]['#rows'] = 50;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function materio_admin_getSimplenewsNodBodyTemplate(){
|
||||
return file_get_contents(drupal_get_path('module', 'materio_admin').'/templates/simplenews_node_template.html');
|
||||
}
|
143
templates/simplenews_node_template.html
Normal file
143
templates/simplenews_node_template.html
Normal file
@ -0,0 +1,143 @@
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="padding: 37px 0; background-color: #eeeeee;" align="center" bgcolor="#eeeeee">
|
||||
<!-- #nl_container -->
|
||||
<table style="margin: 0; border: 1px solid #dddddd; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;" width="600" border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="/sites/default/files/uploaderuneimage.png" width="600" height="400">
|
||||
<br>
|
||||
<!-- #nl_content -->
|
||||
<table style="margin: 0; border-collapse: collapse;" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff; padding: 5px 0;" align="left">
|
||||
<table style="margin: 0 0 0 10px; border-collapse: collapse; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top; padding: 5px 0;" width="580">
|
||||
<table style="border-collapse: collapse; width: 565px; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;" width="565" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="padding: 5px 0 5px 5px; line-height: normal; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;">
|
||||
<p style="color: #444444; text-align: left; ;margin: 0 0 10px; line-height: 1.3em;">
|
||||
<span style="color: #444444; font-family: arial, helvetica, sans-serif;">
|
||||
<strong>
|
||||
ZE DAILY MATERIO'
|
||||
</strong>
|
||||
</span>
|
||||
</p>
|
||||
<p style="color: #444444; ;margin: 0 0 10px; line-height: 1.3em;">
|
||||
<strong>
|
||||
le titre en fr
|
||||
</strong>
|
||||
<br>
|
||||
Toute une série de matières recyclées sous vos pieds, car ces tapis sont tissés avec des chambres à air usagées, des papiers de bonbons minutieusement filés, de vieux journaux et magazines tressés ou d'autres matières recyclées surprenantes. Certains tapis de cette gamme peuvent même aller à l'extérieur.
|
||||
</p>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
<p style="color: #444444; ;margin: 0 0 10px; line-height: 1.3em;">
|
||||
<span style="color: #696969;">
|
||||
<em>
|
||||
<strong>
|
||||
The english title
|
||||
</strong>
|
||||
</em>
|
||||
</span>
|
||||
<br>
|
||||
<span style="color: #808080;">
|
||||
<em>
|
||||
A wide range of beautiful carpets made out of surprising recycled materials: recycled candy wrappers, recycled tires and bike tubes, different recycled fibers and recycled newspaper! Some of them can even be used outside.
|
||||
</em>
|
||||
</span>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table style="margin: 0 0 0 10px; border-collapse: collapse; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top; padding: 5px 0;" width="580">
|
||||
<table style="border-collapse: collapse; width: 565px; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;" width="565" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="padding: 5px 0 5px 5px; line-height: normal;">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0" align="left">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="border-collapse: collapse; align: left;" cellspacing="0" cellpadding="0" align="left">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="padding: 2px; margin: 0; vertical-align: top;">
|
||||
<a href="http://www.facebook.com/sharer.php?u=http://70u.r.mailjet.com/nl/98y/xzkv1.html" target="_blank" style="display: block; border: none; text-decoration: none;">
|
||||
<img src="http://www.mailjet.com/images/theme/v1/icons/ico_social_facebook.png" alt="Facebook" style="vertical-align: top; border: none;">
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding: 2px; margin: 0; vertical-align: top;">
|
||||
<a href="http://twitter.com/share?url=http://70u.r.mailjet.com/nl/98y/xzkv1.html" target="_blank" style="display: block; border: none; text-decoration: none;">
|
||||
<img src="http://www.mailjet.com/images/theme/v1/icons/ico_social_twitter.png" alt="Twitter" style="vertical-align: top; border: none;">
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding: 2px; margin: 0; vertical-align: top;">
|
||||
<a href="http://www.linkedin.com/shareArticle?url=http://70u.r.mailjet.com/nl/98y/xzkv1.html" target="_blank" style="display: block; border: none; text-decoration: none;">
|
||||
<img src="http://www.mailjet.com/images/theme/v1/icons/ico_social_linkedin.png" alt="Linkedin" style="vertical-align: top; border: none;">
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding: 2px; margin: 0; vertical-align: top;">
|
||||
<a href="http://pinterest.com/hello0691/ze-daily-mat%C3%A9rio/" target="_blank" style="display: block; border: none; text-decoration: none;">
|
||||
<img src="http://www.mailjet.com/images/theme/v1/icons/ico_social_pinterest.png" alt="Pinterest" style="vertical-align: top; border: none;">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table style="height: 10px; border-collapse: collapse; font-size: 1px;" border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="height: 10px; border-spacing: 0; font-size: 1px;" height="10">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
Loading…
x
Reference in New Issue
Block a user