@@ -67,6 +67,7 @@ public static function getEverPrettyBlocks($context)
67
67
$ productHighlightTemplate = 'module: ' . $ module ->name . '/views/templates/hook/prettyblocks/prettyblock_product_highlight.tpl ' ;
68
68
$ progressbarTemplate = 'module: ' . $ module ->name . '/views/templates/hook/prettyblocks/prettyblock_progressbar.tpl ' ;
69
69
$ cardTemplate = 'module: ' . $ module ->name . '/views/templates/hook/prettyblocks/prettyblock_card.tpl ' ;
70
+ $ coverTemplate = 'module: ' . $ module ->name . '/views/templates/hook/prettyblocks/prettyblock_cover.tpl ' ;
70
71
$ defaultLogo = Tools::getHttpHost (true ) . __PS_BASE_URI__ . 'modules/ ' . $ module ->name . '/logo.png ' ;
71
72
$ blocks = [];
72
73
$ allShortcodes = EverblockShortcode::getAllShortcodes (
@@ -2744,6 +2745,91 @@ public static function getEverPrettyBlocks($context)
2744
2745
],
2745
2746
],
2746
2747
];
2748
+ $ blocks [] = [
2749
+ 'name ' => $ module ->l ('Cover block ' ),
2750
+ 'description ' => $ module ->l ('Background image with title, text and two buttons ' ),
2751
+ 'code ' => 'everblock_cover ' ,
2752
+ 'tab ' => 'general ' ,
2753
+ 'icon_path ' => $ defaultLogo ,
2754
+ 'need_reload ' => true ,
2755
+ 'templates ' => [
2756
+ 'default ' => $ coverTemplate ,
2757
+ ],
2758
+ 'repeater ' => [
2759
+ 'name ' => 'Cover ' ,
2760
+ 'nameFrom ' => 'title ' ,
2761
+ 'groups ' => [
2762
+ 'title ' => [
2763
+ 'type ' => 'text ' ,
2764
+ 'label ' => $ module ->l ('Title ' ),
2765
+ 'default ' => '' ,
2766
+ ],
2767
+ 'content ' => [
2768
+ 'type ' => 'editor ' ,
2769
+ 'label ' => $ module ->l ('Content ' ),
2770
+ 'default ' => '' ,
2771
+ ],
2772
+ 'background_image ' => [
2773
+ 'type ' => 'fileupload ' ,
2774
+ 'label ' => $ module ->l ('Background image ' ),
2775
+ 'path ' => '$/modules/ ' . $ module ->name . '/views/img/prettyblocks/ ' ,
2776
+ 'default ' => [
2777
+ 'url ' => '' ,
2778
+ ],
2779
+ ],
2780
+ 'btn1_text ' => [
2781
+ 'type ' => 'text ' ,
2782
+ 'label ' => $ module ->l ('Button 1 text ' ),
2783
+ 'default ' => '' ,
2784
+ ],
2785
+ 'btn1_link ' => [
2786
+ 'type ' => 'text ' ,
2787
+ 'label ' => $ module ->l ('Button 1 link ' ),
2788
+ 'default ' => '' ,
2789
+ ],
2790
+ 'btn1_type ' => [
2791
+ 'type ' => 'radio_group ' ,
2792
+ 'label ' => $ module ->l ('Button 1 type ' ),
2793
+ 'default ' => 'primary ' ,
2794
+ 'choices ' => [
2795
+ 'primary ' => 'primary ' ,
2796
+ 'secondary ' => 'secondary ' ,
2797
+ 'success ' => 'success ' ,
2798
+ 'danger ' => 'danger ' ,
2799
+ 'warning ' => 'warning ' ,
2800
+ 'info ' => 'info ' ,
2801
+ 'light ' => 'light ' ,
2802
+ 'dark ' => 'dark ' ,
2803
+ ],
2804
+ ],
2805
+ 'btn2_text ' => [
2806
+ 'type ' => 'text ' ,
2807
+ 'label ' => $ module ->l ('Button 2 text ' ),
2808
+ 'default ' => '' ,
2809
+ ],
2810
+ 'btn2_link ' => [
2811
+ 'type ' => 'text ' ,
2812
+ 'label ' => $ module ->l ('Button 2 link ' ),
2813
+ 'default ' => '' ,
2814
+ ],
2815
+ 'btn2_type ' => [
2816
+ 'type ' => 'radio_group ' ,
2817
+ 'label ' => $ module ->l ('Button 2 type ' ),
2818
+ 'default ' => 'primary ' ,
2819
+ 'choices ' => [
2820
+ 'primary ' => 'primary ' ,
2821
+ 'secondary ' => 'secondary ' ,
2822
+ 'success ' => 'success ' ,
2823
+ 'danger ' => 'danger ' ,
2824
+ 'warning ' => 'warning ' ,
2825
+ 'info ' => 'info ' ,
2826
+ 'light ' => 'light ' ,
2827
+ 'dark ' => 'dark ' ,
2828
+ ],
2829
+ ],
2830
+ ],
2831
+ ],
2832
+ ];
2747
2833
EverblockCache::cacheStore ($ cacheId , $ blocks );
2748
2834
return $ blocks ;
2749
2835
}
0 commit comments