Jump to content
thirty bees forum

Recommended Posts

Posted

i tried now for a better look on my recent posts with tb-bees blog module

before

0_1531351538740_87e2a44e-b871-45c6-99de-54cf6de70127-image.png

after

0_1531351572478_6cdd1122-b50e-41c3-b352-a34e6ee99a0c-image.png

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
Posted

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

0_1531356760841_6b9aff29-d1fc-45a7-919e-d9f1347f39f0-image.png

after changing

0_1531356785102_63ac1f4f-67e7-4338-9571-165f4cb883c3-image.png

Posted

my next change tb blog module thanks @yaniv14

httpdocs / modules / beesblog / views / templates / front / postlistitem.tpl

before 0_1531360834382_c5f3ebb4-1e59-4722-bc47-afdbeb0bc5c9-image.png

{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 0_1531361298073_d91b1580-267c-4e10-addf-29a07c9042d2-image.png

change {$navigationPipe|escape:'htmlall':'UTF-8'} to {$navigationPipe}

Posted

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, 
     ));

```

Posted

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.

Posted

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

Posted

@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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...