Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Display / Hide Block Title Rate Topic   - - - - -

 
  • rdr
  • Member
  • Members
  • Join Date: 02-Jun 08
  • 75 posts

Posted 07 September 2020 - 03:30 PM #1

HI, I'm running 4.7
and I can not figure how to hide or display the block title

The default install do show the block title, but when I create a new block it does not..

I look at the code. this is what I'm missing on my own block
<h3 class="mainbox2-title clearfix">         
                            Our brands  </h3>

it does not appear to be related to User-defined CSS-class



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21916 posts

Posted 08 September 2020 - 05:13 AM #2

Usually block header depends on the selected wrapper

 

https://prnt.sc/udefab


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • rdr
  • Member
  • Members
  • Join Date: 02-Jun 08
  • 75 posts

Posted 23 October 2020 - 10:38 AM #3

Hi, I'm still struggling with this...

I'm using Bright theme I only get to chose between "no wrapper" or 'lite check out"

when using the original main layout..  I get the title but can not hide them

when using a importer layout from a previous install off cs cart.. I get no tile and can not display them -_-

do you have any good suggestion?

 



 



 
  • rdr
  • Member
  • Members
  • Join Date: 02-Jun 08
  • 75 posts

Posted 23 October 2020 - 01:11 PM #4

I investigated further.. it's really weird:

If I use the main layout..  I get the block name to be displayed..
If I delete a block from the layout (not the block it self)  and re add i the name of the block is not displayed



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21916 posts

Posted 23 October 2020 - 01:47 PM #5

Looks like you are trying to change wrapper for grid, but it should be changed on the block level


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • kaltersia
  • Advanced Member
  • Members
  • Join Date: 07-Feb 18
  • 113 posts

Posted 23 October 2020 - 04:41 PM #6

just add a space instead of a title simple as that



 
  • rdr
  • Member
  • Members
  • Join Date: 02-Jun 08
  • 75 posts

Posted 23 October 2020 - 10:09 PM #7

kaltersia   inserting  a html block is a way around.. Thank you if I cant find and other way I'll do that  but the result is not the same

eComLabs  I'm not sur I follow

 

when looking with a "inspector"  this is what the "impossible thing i cannot reproduce look like"

Capture.jpg

there is a lot of code with a <h3> in the block that is missing when I recreate that block on my own.
lets call this block with the <H3> teh cool block for comprehention sake

an other weird thing
if I move this "cool" block to an other grid... it does not keep its title.
and If I move and other block to the grid the "cool" blok was .. is does not displays its title either


                
            
                
           Anyway ..It might be to complicate to figure out what going on.. to go back to your original reply.
in usual situation it is the block wrapper that chose if there is a title or not ?
where do we edit those wrapper and how? doesn't the default theme comes with already made wrapper?
               



 
  • kaltersia
  • Advanced Member
  • Members
  • Join Date: 07-Feb 18
  • 113 posts

Posted 25 October 2020 - 02:39 PM #8

i cann't follow you  from your first post you say i cannot hide block title or show. 

 

to hide block title 

1 . use no wrapper

2 . use space instead of writing a tittle

 

 

to show block title write the title and use wrapper  ( h1,h2,h3) heading

 

 

add your own class to that block than from css 

 

example you add class =yourClassName

 

 

to show

.yourClassName h2 { display:block;}

 

to hide 

 

.yourClassName h2 { display:none;}



 
  • rdr
  • Member
  • Members
  • Join Date: 02-Jun 08
  • 75 posts

Posted 26 October 2020 - 08:44 AM #9

Sorry let me rephrase:

Here is what my layout look like
Attached File  Capture.JPG   30.41KB   0 downloads

the only wrapper option I have are:

Attached File  Untitled-1.jpg   62.84KB   0 downloads

1) IF I understand correctly in normal cases title display depends on the wrapper

===>  where do I edit wrapper
===>   where do I create new one
 

 

 

 



 
  • kaltersia
  • Advanced Member
  • Members
  • Join Date: 07-Feb 18
  • 113 posts

Posted 26 October 2020 - 09:41 AM #10

default wrappers are located in    "/design/themes/responsive/templates/blocks/wrappers/"

 

 

 

you can create your own wrappers at  "/design/themes/responsive/templates/addons/my_changes/blocks/wrappers/"

 

to use own wrappers you have first to enable my_changes addon and create the directories and files manually



 
  • rdr
  • Member
  • Members
  • Join Date: 02-Jun 08
  • 75 posts

Posted 26 October 2020 - 12:49 PM #11

OK
I've enabled "My changes"

I created a /design/themes/responsive/templates/addons/my_changes/blocks/wrappers/
and a
/design/themes/bright_theme/templates/addons/my_changes/blocks/wrappers/  (since I'm using bright)

I placed test.tpl

{if $content|trim}

            <h2 class="ty-mainbox-title"><span>
                {hook name="wrapper:mainbox_simple_title"}
                {if $smarty.capture.title|trim}
                    {$smarty.capture.title nofilter}
                {else}
                    {$title nofilter}
                {/if}
                {/hook}
            </span></h2>
      
{/if}

But I can not see any change in the wrapper list I still only have none or lite checkout

 



 
  • kaltersia
  • Advanced Member
  • Members
  • Join Date: 07-Feb 18
  • 113 posts

Posted 26 October 2020 - 01:44 PM #12

Have you deleted cache from   " /var/cache/ "

 

this is what i have in general.tpl   but you have a very old cs-cart version

{if $content|trim}
    <div class="ty-mainbox-container clearfix{if isset($hide_wrapper)} cm-hidden-wrapper{/if}{if $hide_wrapper} hidden{/if}{if $details_page} details-page{/if}{if $block.user_class} {$block.user_class}{/if}{if $content_alignment == "RIGHT"} ty-float-right{elseif $content_alignment == "LEFT"} ty-float-left{/if}">
        {if $title || $smarty.capture.title|trim}
            {hook name="wrapper:mainbox_general_title_wrapper"}
                <h1 class="ty-mainbox-title">
                    {hook name="wrapper:mainbox_general_title"}
                    {if $smarty.capture.title|trim}
                        {$smarty.capture.title nofilter}
                    {else}
                        {$title nofilter}
                    {/if}
                    {/hook}
                </h1>
            {/hook}
        {/if}
        <div class="ty-mainbox-body">{$content nofilter}</div>
    </div>
{/if}


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21916 posts

Posted 26 October 2020 - 01:59 PM #13

But I can not see any change in the wrapper list I still only have none or lite checkout

 

Again, you are checking grid wrappers. You should check block wrappers

 

https://prnt.sc/v74jdw


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • rdr
  • Member
  • Members
  • Join Date: 02-Jun 08
  • 75 posts

Posted 26 October 2020 - 02:05 PM #14

I deleted /var/cache/*  
Sorry : ( 
No luck , only wrapper available still is "lite checkout"

Note: I manage to update to the latest cs cart , my mainbox_general.tpl in  responsive should be the same

 

{if $content|trim}
    <div class="ty-mainbox-container clearfix{if isset($hide_wrapper)} cm-hidden-wrapper{/if}{if $hide_wrapper} hidden{/if}{if $details_page} details-page{/if}{if $block.user_class} {$block.user_class}{/if}{if $content_alignment == "RIGHT"} ty-float-right{elseif $content_alignment == "LEFT"} ty-float-left{/if}">
        {if $title || $smarty.capture.title|trim}
            {hook name="wrapper:mainbox_general_title_wrapper"}
                <h1 class="ty-mainbox-title">
                    {hook name="wrapper:mainbox_general_title"}
                    {if $smarty.capture.title|trim}
                        {$smarty.capture.title nofilter}
                    {else}
                        {$title nofilter}
                    {/if}
                    {/hook}
                </h1>
            {/hook}
        {/if}
        <div class="ty-mainbox-body">{$content nofilter}</div>
    </div>
{/if}

 

 

 



 
  • rdr
  • Member
  • Members
  • Join Date: 02-Jun 08
  • 75 posts

Posted 26 October 2020 - 02:06 PM #15

Again, you are checking grid wrappers. You should check block wrappers

 

https://prnt.sc/v74jdw

where do you select see those? not in the layout editing panel?



 
  • rdr
  • Member
  • Members
  • Join Date: 02-Jun 08
  • 75 posts

Posted 26 October 2020 - 02:13 PM #16

By blocs wrappers you mean blocs templates.
Attached File  Capture.JPG   24.91KB   0 downloads

I should edit core file.  ok .. kind of feels extreme .. I need to find those do you know where they are  located



 
  • kaltersia
  • Advanced Member
  • Members
  • Join Date: 07-Feb 18
  • 113 posts

Posted 26 October 2020 - 02:55 PM #17

Check for wrappers at the block 

 

the red circle there are youre wrappers.

Attached Files



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21916 posts

Posted 27 October 2020 - 04:51 AM #18

By blocs wrappers you mean blocs templates.
attachicon.gif Capture.JPG

I should edit core file.  ok .. kind of feels extreme .. I need to find those do you know where they are  located

 

As it was mentioned before, wrappers are located here

 

design/themes/responsive/templates/blocks/wrappers

 

and you can create own wrappers for blocks with your module

 

After the new wrapper is created, do not forget to clear cache


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • rdr
  • Member
  • Members
  • Join Date: 02-Jun 08
  • 75 posts

Posted 27 October 2020 - 08:01 AM #19

I FINALY FOUND THE PROBLEM / But did not solve it..

 

Check for wrappers at the block 

 

the red circle there are youre wrappers.

This cogwhell  always give me a a "ErrorOops, something went wrong (Forbidden). Please try again." and does nothings..

 

I tried the CS cart demo .. and the cogwhell does display a page...!  so here is my problem

I tried all theme.. same issue..
I'm running  4.11.5

 



 
  • rdr
  • Member
  • Members
  • Join Date: 02-Jun 08
  • 75 posts

Posted 27 October 2020 - 08:14 AM #20

and here is my server error log ..

 


ModSecurity: Access denied with code 403 (phase 2).
 Pattern match "(?i:\\\\b(?:t(?:able_name\\\\b|extpos[^a-zA-Z0-9_]{1,}\\\\()|
(?:a(?:ll_objects|tt(?:rel|typ)id)|column_(?:id|name)
|mb_users|object_(?:id|(?:nam|typ)e)|pg_(?:attribute|class)|rownum|s
(?:ubstr(?:ing){0,1}|ys(?:c(?:at|o(?:lumn|nstraint)s)|dba|ibm|(?:filegroup|o ..." 
at ARGS_NAMES:dynamic_object[object_id]. [file "/etc/apache2/modsecurity.d/rules/comodo_free/22_SQL_SQLi.conf"] 
[line "17"] [id "211540"] [rev "12"] [msg "COMODO WAF: Blind SQL Injection Attack||shop.ruederome.com|F|2"]
 [data "Matched Data: object_id found within ARGS_NAMES:dynamic_object[object_id]: dynamic_object[object_id]"]
 [severity "CRITICAL"] [tag "CWAF"] [tag "SQLi"] [hostname "shop.xxx.com"] 
[uri "/admin.php"] [unique_id "X5fWcH8AAQEAAETGcikAAAAV"], 
referer: https://shop.xxx.com/admin.php?dispatch=block_manager.manage