Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Sample data expanded with images and headings h1 #147

Closed
wants to merge 29 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9237db6
Change show-page-heading to "yes"
chmst Sep 28, 2020
69aa54b
Merge branch 'development' into sample-data-menuitem-alias
richard67 Sep 29, 2020
8632585
Add some more text to newsflash cards
chmst Sep 29, 2020
0809bcf
Add some sample images, j4 rocket
chmst Sep 29, 2020
5f8d011
Add pae-heading-param for H1, change parent in metismenu to type head…
chmst Sep 29, 2020
386e73a
Fix h1 in metis menu blog
chmst Sep 29, 2020
b751877
Merge branch 'development' into sample-data-menuitem-alias
richard67 Sep 30, 2020
e293e4e
Merge branch 'development' into sample-data-menuitem-alias
richard67 Sep 30, 2020
d08fdcd
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 1, 2020
8f2ff9a
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 1, 2020
eed22d5
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 1, 2020
16f5057
fix codestyle
chmst Oct 2, 2020
7baea3c
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 2, 2020
a6cf910
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 2, 2020
76e18e5
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 7, 2020
8c36b6e
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 7, 2020
b326f79
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 8, 2020
1fb5ed0
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 9, 2020
7580362
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 13, 2020
6d9c924
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 13, 2020
0fb070c
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 15, 2020
5828aee
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 17, 2020
9384a88
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 18, 2020
5511140
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 19, 2020
7bd72e7
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 19, 2020
7320cb3
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 19, 2020
dcb1d34
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 20, 2020
966e270
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 21, 2020
b2b0ca8
Merge branch 'development' into sample-data-menuitem-alias
richard67 Oct 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 35 additions & 31 deletions plugins/sampledata/blog/blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ public function onAjaxSampledataApplyStep1()
'featured' => 1,
'ordering' => 2,
'images' => array(
'image_intro' => 'images/banners/banner.jpg',
'show_page_heading' => '1',
'image_intro' => 'images/sampledata/cassiopeia/rocket-1000.jpg',
'float_intro' => 'left',
'image_intro_alt' => '',
'image_intro_caption' => '',
Expand All @@ -294,7 +295,8 @@ public function onAjaxSampledataApplyStep1()
'featured' => 1,
'ordering' => 1,
'images' => array(
'image_intro' => 'images/banners/banner.jpg',
'show_page_heading' => '1',
'image_intro' => 'images/sampledata/cassiopeia/rocket-1000.jpg',
'float_intro' => 'right',
'image_intro_alt' => '',
'image_intro_caption' => '',
Expand All @@ -309,7 +311,8 @@ public function onAjaxSampledataApplyStep1()
'featured' => 1,
'ordering' => 0,
'images' => array(
'image_intro' => 'images/banners/banner.jpg',
'show_page_heading' => '1',
'image_intro' => 'images/sampledata/cassiopeia/rocket-1000.jpg',
'float_intro' => 'left',
'image_intro_alt' => '',
'image_intro_caption' => '',
Expand All @@ -323,13 +326,15 @@ public function onAjaxSampledataApplyStep1()
'catid' => $catIds[0],
'featured' => 0,
'ordering' => 0,
'show_page_heading' => '1',
),
array(
'catid' => $catIds[2],
'featured' => 0,
'ordering' => 0,
'featured' => 0,
'ordering' => 0,
'images' => array(
'image_intro' => 'images/banners/banner.jpg',
'show_page_heading' => '1',
'image_intro' => 'images/sampledata/cassiopeia/blue-rocket-400.jpg',
chmst marked this conversation as resolved.
Show resolved Hide resolved
'float_intro' => '',
'image_intro_alt' => '',
'image_intro_caption' => '',
Expand All @@ -344,7 +349,8 @@ public function onAjaxSampledataApplyStep1()
'featured' => 0,
'ordering' => 0,
'images' => array(
'image_intro' => 'images/banners/banner.jpg',
'show_page_heading' => '1',
'image_intro' => 'images/sampledata/cassiopeia/rocket-400.jpg',
chmst marked this conversation as resolved.
Show resolved Hide resolved
'float_intro' => '',
'image_intro_alt' => '',
'image_intro_caption' => '',
Expand All @@ -359,7 +365,8 @@ public function onAjaxSampledataApplyStep1()
'featured' => 0,
'ordering' => 0,
'images' => array(
'image_intro' => 'images/banners/banner.jpg',
'show_page_heading' => '1',
'image_intro' => 'images/sampledata/cassiopeia/blue-rocket-400.jpg',
chmst marked this conversation as resolved.
Show resolved Hide resolved
'float_intro' => '',
'image_intro_alt' => '',
'image_intro_caption' => '',
Expand Down Expand Up @@ -530,6 +537,8 @@ public function onAjaxSampledataApplyStep2()
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'layout_type' => 'blog',
'show-titles' => 1,
'link-titles' => 0,
'show_category_title' => 0,
'num_leading_articles' => 4,
'num_intro_articles' => 0,
Expand All @@ -556,6 +565,7 @@ public function onAjaxSampledataApplyStep2()
'link' => 'index.php?option=com_content&view=article&id=' . $articleIds[0],
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'show_title' => 0,
'info_block_position' => 0,
'show_category' => 0,
'link_category' => 0,
Expand All @@ -575,6 +585,7 @@ public function onAjaxSampledataApplyStep2()
'link' => 'index.php?option=com_users&view=login',
'component_id' => ExtensionHelper::getExtensionRecord('com_users', 'component')->extension_id,
'params' => array(
'show_title' => 0,
'logindescription_show' => 1,
'logoutdescription_show' => 1,
'menu_text' => 1,
Expand Down Expand Up @@ -606,7 +617,7 @@ public function onAjaxSampledataApplyStep2()
'enable_category' => 1,
'catid' => $catids[0],
'menu_text' => 1,
'show_page_heading' => 1,
'show_page_heading' => 0,
'secure' => 0,
),
),
Expand All @@ -617,7 +628,7 @@ public function onAjaxSampledataApplyStep2()
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'menu_text' => 1,
'show_page_heading' => 1,
'show_page_heading' => 0,
'secure' => 0,
),
),
Expand Down Expand Up @@ -718,7 +729,7 @@ public function onAjaxSampledataApplyStep2()
'access' => 6,
'params' => array(
'menu_text' => 1,
'show_page_heading' => 1,
'show_page_heading' => 0,
'secure' => 0,
),
),
Expand All @@ -730,7 +741,7 @@ public function onAjaxSampledataApplyStep2()
'component_id' => ExtensionHelper::getExtensionRecord('com_config', 'component')->extension_id,
'params' => array(
'menu_text' => 1,
'show_page_heading' => 1,
'show_page_heading' => 0,
'secure' => 0,
),
),
Expand All @@ -743,6 +754,7 @@ public function onAjaxSampledataApplyStep2()
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'layout_type' => 'blog',
'link_titles' => 0,
'show_category_title' => 0,
'num_leading_articles' => 1,
'num_intro_articles' => 2,
Expand All @@ -759,7 +771,7 @@ public function onAjaxSampledataApplyStep2()
'show_hits' => 0,
'show_feed_link' => 0,
'menu_text' => 1,
'show_page_heading' => 1,
'show_page_heading' => 0,
'secure' => 0,
),
),
Expand All @@ -781,26 +793,12 @@ public function onAjaxSampledataApplyStep2()
// Articles (menu header)
'menutype' => $menuTypes[0],
'title' => Text::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_ITEM_13_TITLE'),
'link' => 'index.php?option=com_content&view=category&layout=blog&id=' . $catids[2],
'type' => 'heading',
'link' => '',
'component_id' => 0,
'parent_id' => $menuIdsLevel1[3],
'component_id' => ExtensionHelper::getExtensionRecord('com_content', 'component')->extension_id,
'params' => array(
'layout_type' => 'blog',
'show_category_title' => 0,
'num_leading_articles' => 3,
'num_intro_articles' => 0,
'num_links' => 2,
'orderby_sec' => 'front',
'order_date' => 'published',
'blog_class_leading' => 'boxed columns-3',
'blog_class' => '',
'show_pagination' => 2,
'show_pagination_results' => 1,
'show_category' => 0,
'info_bloc_position' => 0,
'show_publish_date' => 0,
'show_hits' => 0,
'show_feed_link' => 0,
'layout_type' => 'heading',
'menu_text' => 1,
'show_page_heading' => 1,
'secure' => 0,
Expand Down Expand Up @@ -1374,6 +1372,12 @@ private function addMenuItems(array $menuItems, $level)
$menuItem['level'] = $level;
$menuItem['home'] = 0;

// Set pageheading = title to enforce h1 headings
if (isset($menuItem['show_page_heading']) && $menuItem['show_page_heading'])
{
$menuItem['page_heading'] = $menuItem['title'];
}

// Set browserNav to default if not set
if (!isset($menuItem['browserNav']))
{
Expand Down