roman.lesnikov@gmail.com 3 лет назад
Родитель
Сommit
769d55eebf

+ 2 - 3
modules/base/general/classes/BxBaseModGeneralTemplate.php

@@ -211,12 +211,11 @@ class BxBaseModGeneralTemplate extends BxDolModuleTemplate
     public function entryBreadcrumb($aContentInfo, $aTmplVarsItems = array())
     {
     	$CNF = &BxDolModule::getInstance($this->MODULE)->_oConfig->CNF;
-
-    	return $this->parseHtmlByName('breadcrumb.html', array(
+    	return bx_is_api() ? ['id' => 2, 'type' => 'breadcrumb', 'data' => ['name' => BxDolModule::getInstance($this->MODULE)->_aModule['title'], 'url' => BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME'])]] : $this->parseHtmlByName('breadcrumb.html', [
     		'url_home' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME'])),
     		'icon_home' => $CNF['ICON'],
     		'bx_repeat:items' => $aTmplVarsItems
-    	));
+    	]);
     }
 
     public function entryText ($aData, $sTemplateName = 'entry-text.html')

+ 1 - 0
modules/boonex/posts/install/langs/en.xml

@@ -125,6 +125,7 @@
     <string name="_bx_posts_page_block_title_recent_entries_view_full"><![CDATA[Latest Posts (Full View)]]></string>
     <string name="_bx_posts_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
     <string name="_bx_posts_page_block_title_entry_author"><![CDATA[Author]]></string>
+    <string name="_bx_posts_page_block_title_entry_breadcrumb"><![CDATA[Breadcrumb]]></string>
     <string name="_bx_posts_page_block_title_entry_actions"><![CDATA[Actions]]></string>
     <string name="_bx_posts_page_block_title_entry_comments"><![CDATA[Comments]]></string>
     <string name="_bx_posts_page_block_title_entry_reports"><![CDATA[Reports]]></string>

+ 1 - 0
modules/boonex/posts/install/sql/enable.sql

@@ -55,6 +55,7 @@ INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `lay
 ('bx_posts_view_entry', '_bx_posts_page_title_sys_view_entry', '_bx_posts_page_title_view_entry', 'bx_posts', 12, 2147483647, 1, 'view-post', '', '', '', '', 0, 1, 0, 'BxPostsPageEntry', 'modules/boonex/posts/classes/BxPostsPageEntry.php');
 
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_posts_view_entry', 1,'bx_posts','', '_bx_posts_page_block_title_entry_breadcrumb', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_posts";s:6:"method";s:17:"entity_breadcrumb";}', 0, 0, 1, 1),
 ('bx_posts_view_entry', 2, 'bx_posts', '', '_bx_posts_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 2),
 ('bx_posts_view_entry', 2, 'bx_posts', '', '_bx_posts_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:13:\"entity_author\";}', 0, 0, 1, 1),
 ('bx_posts_view_entry', 3, 'bx_posts', '_bx_posts_page_block_title_sys_entry_context', '_bx_posts_page_block_title_entry_context', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:14:\"entity_context\";}', 0, 0, 1, 1),