Add SEO tab for a product
This commit is contained in:
79
templates/backOffice/default/includes/seo-tab.html
Normal file
79
templates/backOffice/default/includes/seo-tab.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<div class="form-container">
|
||||
|
||||
<form method="POST" action="{$formAction}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = false
|
||||
|
||||
page_url = {$pageUrl}
|
||||
close_url = {$closeUrl}
|
||||
}
|
||||
|
||||
{* Hidden field *}
|
||||
<input type="hidden" name="current_tab" value="seo">
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='url'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">
|
||||
{$label} :{if $required} <span class="required">*</span>{/if}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$url_language|default:{config key="url_site"}}</span>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" {if $required} aria-required="true" required{/if} class="form-control" placeholder="{intl l='Use the keyword phrase in your URL.'}">
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
|
||||
{form_field form=$form field='meta_title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">
|
||||
{$label} :{if $required} <span class="required">*</span>{/if}
|
||||
<span class="label-help-block">{intl l='The HTML TITLE element is the most important element on your web page.'}</span>
|
||||
</label>
|
||||
<div class="control-input">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l='Make sure that your title is clear, and contains many of the keywords within the page itself.'}">
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='meta_description'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">
|
||||
{$label} :{if $required} <span class="required">*</span>{/if}
|
||||
<span class="label-help-block">{intl l='Keep the most important part of your description in the first 150-160 characters.'}</span>
|
||||
</label>
|
||||
|
||||
<textarea name="{$name}" id="{$label_attr.for}" rows="6"{if $required} aria-required="true" required{/if} placeholder="{intl l='Make sure it uses keywords found within the page itself.'}" class="form-control">{$value}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='meta_keyword'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">
|
||||
{$label} :{if $required} <span class="required">*</span>{/if}
|
||||
<span class="label-help-block">{intl l='You don\'t need to use commas or other punctuations.'}</span>
|
||||
</label>
|
||||
|
||||
<textarea name="{$name}" id="{$label_attr.for}" rows="3"{if $required} aria-required="true" required{/if} placeholder="{intl l='Don\'t repeat keywords over and over in a row. Rather, put in keyword phrases.'}" class="form-control">{$value}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = false
|
||||
hide_flags = true
|
||||
|
||||
page_url = {$pageUrl}
|
||||
close_url = {$closeUrl}
|
||||
}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@@ -48,6 +48,8 @@
|
||||
data-toggle="tab">{intl l="General"}</a>
|
||||
</li>
|
||||
|
||||
<li><a href="#seo" data-toggle="tab">{intl l="SEO"}</a></li>
|
||||
|
||||
<li>
|
||||
<a href="#details" data-toggle="tab">{intl l="Details"}</a>
|
||||
</li>
|
||||
@@ -79,7 +81,7 @@
|
||||
{intl l="Documents"}
|
||||
</a>
|
||||
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
@@ -87,6 +89,18 @@
|
||||
{include file="includes/product-general-tab.html"}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="seo">
|
||||
{form name="thelia.admin.seo"}
|
||||
{include file="includes/seo-tab.html"
|
||||
form = $form
|
||||
currentId = "{$ID}"
|
||||
formAction = "{url path='/admin/products/seo/save'}"
|
||||
pageUrl = "{url path='/admin/products/update' product_id=$ID}"
|
||||
closeUrl = "{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
|
||||
}
|
||||
{/form}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="details">
|
||||
{include file="includes/product-details-tab.html"}
|
||||
</div>
|
||||
@@ -110,6 +124,7 @@
|
||||
<div class="tab-pane fade" id="modules">
|
||||
<div class="text-center"><span class="loading">{intl l="Please wait, loading"}</span></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user