colorful-ant Posted July 11, 2018 Share Posted July 11, 2018 i tried now for a better look on my recent posts with tb-bees blog module before after i changed httpdocs / modules / beesblogrecentposts / views / templates / hooks / column.tpl <div class="beesblogrecentposts-content"> <h5> <a class="beesblogrecentposts-title" href="{$post->link|escape:'htmlall':'UTF-8'}" title="{$post->title|escape:'htmlall':'UTF-8'}"> {$post->title|truncate:'20'|escape:'htmlall':'UTF-8'} </a> </h5> <span> <i class="icon icon-calendar"></i> {$post->published|date_format} <i class="icon icon-eye"></i> {$post->viewed|intval} </span> </div> to <div class="beesblogrecentposts-content"> <h5> <a class="beesblogrecentposts-title" href="{$post->link|escape:'htmlall':'UTF-8'}" title="{$post->title|escape:'htmlall':'UTF-8'}"> {$post->title|truncate:'20'|escape:'htmlall':'UTF-8'} </a> </h5> <span> <i class="icon icon-calendar"></i> {$post->published|date_format} <i class="icon icon-eye"></i> {$post->viewed|intval} </span> </div> <hr> i add only after the Link to comment Share on other sites More sharing options...
colorful-ant Posted July 12, 2018 Author Share Posted July 12, 2018 In addition, I have made further adjustments to the standard page of the blog example additional heading and description https://myshop/(language/)blog httpdocs / modules / beesblog / views / templates / front / category.tpl <div id="beesblog-category-list" class="block"> {foreach from=$posts item=post} {include file="./post_list_item.tpl" post=$post} {/foreach} </div> to (you can change the h1-tags to another tag) enter your desired data between {l s = 'and'} or use the translation in the BO <div id="beesblog-category-list" class="block"> <h1>{l s='Shop Blog' mod='beesblog'}</h1> <p>{l s='Here you will find our current and additional information about our shop and ........ mod='beesblog'}</p> <hr> {foreach from=$posts item=post} {include file="./post_list_item.tpl" post=$post} {/foreach} </div> before after changing Link to comment Share on other sites More sharing options...
colorful-ant Posted July 12, 2018 Author Share Posted July 12, 2018 my next change tb blog module thanks @yaniv14 httpdocs / modules / beesblog / views / templates / front / postlistitem.tpl before {if $totalPostsOnThisPage > 0} {if $category->id} <span class="navigation-pipe">{$navigationPipe|escape:'htmlall':'UTF-8'}</span>{l s='Category: %s' mod='beesblog' sprintf=[$category->title]} {else} <span class="navigation-pipe">{$navigationPipe|escape:'htmlall':'UTF-8'}</span>{$category->title|escape:'htmlall':'UTF-8'} {/if} to {if $totalPostsOnThisPage > 0} {if $category->id} <span class="navigation-pipe">{$navigationPipe}</span>{l s='Category: %s' mod='beesblog' sprintf=[$category->title]} {else} <span class="navigation-pipe">{$navigationPipe}</span>{$category->title|escape:'htmlall':'UTF-8'} {/if} new change {$navigationPipe|escape:'htmlall':'UTF-8'} to {$navigationPipe} Link to comment Share on other sites More sharing options...
colorful-ant Posted July 12, 2018 Author Share Posted July 12, 2018 changing step 5 simple meta-title httpdocs / modules / beesblog / controllers / front / post.php find $this->context->smarty->assign($postProperties); and change to ``` $this->context->smarty->assign($postProperties); $this->context->smarty->assign(array( 'meta_title' => $post->title, )); ``` Link to comment Share on other sites More sharing options...
MockoB Posted July 12, 2018 Share Posted July 12, 2018 What's your advice for ppl who are not familiar with coding, should I buy blog module which already has meta titles specified? Edit: never mind I just read your other post in the SEO topic, which clearly answers my question. Link to comment Share on other sites More sharing options...
Tomik Posted July 12, 2018 Share Posted July 12, 2018 thats looks good :) Link to comment Share on other sites More sharing options...
colorful-ant Posted July 12, 2018 Author Share Posted July 12, 2018 can someone help? i try to integrate the meta-description i can add in file httpdocs / modules / beesblog / controllers / front / post.php under my changes $this->context->smarty->assign(array( 'meta_description' => $post->content, but i dont know how to truncate - for example 160 signs Link to comment Share on other sites More sharing options...
datakick Posted July 13, 2018 Share Posted July 13, 2018 @colorful-ant try this ``` $content = strip_tags($post->content); $pos = strpos($content, ' ', 160); $meta = substr($content, 0, $pos); ... 'meta_description' => $meta ``` This will strip HTML tags from post, and take max 160 characters. It does not break words - meta description can, and usually will be, a bit shorted than 160 characters. Link to comment Share on other sites More sharing options...
colorful-ant Posted July 13, 2018 Author Share Posted July 13, 2018 @datakick said in change beesblogrecentposts: try this very great, it works - many thanks for your help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now