diff --git a/ezpublish_legacy/extension/ezecosystem/design/eze/templates/parts/homepage.tpl b/ezpublish_legacy/extension/ezecosystem/design/eze/templates/parts/homepage.tpl
index dab25fc53..4ab33b9e4 100755
--- a/ezpublish_legacy/extension/ezecosystem/design/eze/templates/parts/homepage.tpl
+++ b/ezpublish_legacy/extension/ezecosystem/design/eze/templates/parts/homepage.tpl
@@ -23,7 +23,13 @@
$current_node = fetch( 'content', 'node', hash( 'node_id', $home_page_root_node_id ) )
$notifications_node_id=ezini('NodeIDSettings','NotificationNodeID','ezecosystem.ini')
$notifications_class=array( ezini('ClassIdentifierSettings','classNotification','ezecosystem.ini') )
- $home_page_post_fetch_language='eng-US'}
+ $home_page_post_fetch_language='eng-US'
+ $home_page_section_forums=ezini('HomePageSectionSettings','ForumsSectionID','ezecosystem.ini')
+ $home_page_section_issues=ezini('HomePageSectionSettings','IssuesSectionID','ezecosystem.ini')
+ $home_page_section_homepageandgithub=ezini('HomePageSectionSettings','HomePageAndGitHubSectionID','ezecosystem.ini')
+ $home_page_section_github=ezini('HomePageSectionSettings','GitHubSectionID','ezecosystem.ini')
+ $home_page_section_planet=ezini('HomePageSectionSettings','PlanetSectionID','ezecosystem.ini')
+}
{if $mirror_node_id|is_set|not}
{def $mirror_node_id=ezini('NodeIDSettings','MirrorNodeID','ezecosystem.ini')}
@@ -35,6 +41,8 @@
{def $currentPageUri=concat( '/', $node.url )}
{/if}
+{set-block scope=global variable=cache_ttl}0{/set-block}
+
{* $rss_export = fetch( 'rss', 'export_by_node', hash( 'node_id', $home_page_root_node_id) ) *}
@@ -86,150 +94,163 @@
{/foreach}
{/if}
{else}
+ {* ELSE - Tag View Parameter is not available - AKA - Default *}
+
{* ezini( 'MenuContentSettings', 'ExtraIdentifierList', 'menu.ini' ) *}
{* if le( $current_node.depth, '3')}
{set $home_page_fetch_classes = $home_page_fetch_classes|merge( ezini( 'ChildrenNodeList', 'ExcludedClasses', 'content.ini' ) )}
{/if *}
+ {* Forums Root Node *}
{if $home_page_root_node_id|eq( $forums_node_id )}
- {def $children_count=fetch( 'content', 'list_count', hash( 'parent_node_id', $mirror_node_id,
- 'class_filter_type', 'exclude',
- 'class_filter_array', array( 'forum', 'forums' ),
- 'attribute_filter', array( array( 'section', '=', '12' ) ),
- 'depth', $home_page_fetch_depth ) )}
- {def $home_page_fetch_sort_array_published = array( 'published', false() )
- $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
- $children = fetch( 'content', 'list', hash( 'parent_node_id', $mirror_node_id,
- 'class_filter_type', 'exclude',
- 'class_filter_array', array( 'forum', 'forums' ),
- 'attribute_filter', array( array( 'section', '=', '12' ) ),
- 'offset', $view_parameters.offset,
- 'sort_by', $home_page_fetch_sort_array,
- 'ignore_visibility', false(),
- 'depth', $home_page_fetch_depth,
- 'limit', $page_limit ) )}
+ {def $children_count=fetch( 'content', 'list_count', hash( 'parent_node_id', $mirror_node_id,
+ 'class_filter_type', 'exclude',
+ 'class_filter_array', array( 'forum', 'forums' ),
+ 'attribute_filter', array( array( 'section', '=', $home_page_section_forums ) ),
+ 'depth', $home_page_fetch_depth ) )}
+ {def $home_page_fetch_sort_array_published = array( 'published', false() )
+ $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
+ $children = fetch( 'content', 'list', hash( 'parent_node_id', $mirror_node_id,
+ 'class_filter_type', 'exclude',
+ 'class_filter_array', array( 'forum', 'forums' ),
+ 'attribute_filter', array( array( 'section', '=', $home_page_section_forums ) ),
+ 'offset', $view_parameters.offset,
+ 'sort_by', $home_page_fetch_sort_array,
+ 'ignore_visibility', false(),
+ 'depth', $home_page_fetch_depth,
+ 'limit', $page_limit ) )}
+ {* Share.ez.no Forums Root Node *}
{elseif $home_page_root_node_id|eq( $share_forums_node_id )}
- {def $children_count=fetch( 'content', 'list_count', hash( 'parent_node_id', $share_forums_node_id,
- 'class_filter_type', 'exclude',
- 'class_filter_array', array( 'forum', 'forums' ),
- 'attribute_filter', array( array( 'section', '=', '12' ) ),
- 'depth', $home_page_fetch_depth ) )}
- {def $home_page_fetch_sort_array_published = array( 'published', false() )
- $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
- $children = fetch( 'content', 'list', hash( 'parent_node_id', $share_forums_node_id,
- 'class_filter_type', 'exclude',
- 'class_filter_array', array( 'forum', 'forums' ),
- 'attribute_filter', array( array( 'section', '=', '12' ) ),
- 'offset', $view_parameters.offset,
- 'sort_by', $home_page_fetch_sort_array,
- 'ignore_visibility', false(),
- 'depth', $home_page_fetch_depth,
- 'limit', $page_limit ) )}
+ {def $children_count=fetch( 'content', 'list_count', hash( 'parent_node_id', $share_forums_node_id,
+ 'class_filter_type', 'exclude',
+ 'class_filter_array', array( 'forum', 'forums' ),
+ 'attribute_filter', array( array( 'section', '=', $home_page_section_forums ) ),
+ 'depth', $home_page_fetch_depth ) )}
+ {def $home_page_fetch_sort_array_published = array( 'published', false() )
+ $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
+ $children = fetch( 'content', 'list', hash( 'parent_node_id', $share_forums_node_id,
+ 'class_filter_type', 'exclude',
+ 'class_filter_array', array( 'forum', 'forums' ),
+ 'attribute_filter', array( array( 'section', '=', $home_page_section_forums ) ),
+ 'offset', $view_parameters.offset,
+ 'sort_by', $home_page_fetch_sort_array,
+ 'ignore_visibility', false(),
+ 'depth', $home_page_fetch_depth,
+ 'limit', $page_limit ) )}
+ {* StackOverflow Forums Root Node *}
{elseif $home_page_root_node_id|eq( $stackoverflow_forums_node_id )}
- {def $children_count=fetch( 'content', 'list_count', hash( 'parent_node_id', $home_page_root_node_id,
- 'class_filter_type', 'exclude',
- 'class_filter_array', array( 'forum', 'forums' ),
- 'attribute_filter', array( array( 'section', '=', '12' ) ),
- 'depth', $home_page_fetch_depth ) )}
- {def $home_page_fetch_sort_array_published = array( 'published', false() )
- $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
- $children = fetch( 'content', 'list', hash( 'parent_node_id', $home_page_root_node_id,
- 'class_filter_type', 'exclude',
- 'class_filter_array', array( 'forum', 'forums' ),
- 'attribute_filter', array( array( 'section', '=', '12' ) ),
- 'offset', $view_parameters.offset,
- 'sort_by', $home_page_fetch_sort_array,
- 'ignore_visibility', false(),
- 'depth', $home_page_fetch_depth,
- 'limit', $page_limit ) )}
+ {def $children_count=fetch( 'content', 'list_count', hash( 'parent_node_id', $home_page_root_node_id,
+ 'class_filter_type', 'exclude',
+ 'class_filter_array', array( 'forum', 'forums' ),
+ 'attribute_filter', array( array( 'section', '=', $home_page_section_forums ) ),
+ 'depth', $home_page_fetch_depth ) )}
+ {def $home_page_fetch_sort_array_published = array( 'published', false() )
+ $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
+ $children = fetch( 'content', 'list', hash( 'parent_node_id', $home_page_root_node_id,
+ 'class_filter_type', 'exclude',
+ 'class_filter_array', array( 'forum', 'forums' ),
+ 'attribute_filter', array( array( 'section', '=', $home_page_section_forums ) ),
+ 'offset', $view_parameters.offset,
+ 'sort_by', $home_page_fetch_sort_array,
+ 'ignore_visibility', false(),
+ 'depth', $home_page_fetch_depth,
+ 'limit', $page_limit ) )}
+ {* Forums Subtree Root Nodes *}
{elseif $forums_node_ids|contains( $home_page_root_node_id )}
- {def $children_count=fetch( 'content', 'list_count', hash( 'parent_node_id', $home_page_root_node_id,
- 'attribute_filter', array( array( 'section', '=', '12' ) ),
- 'depth', $home_page_fetch_depth ) )}
- {def $home_page_fetch_sort_array_published = array( 'published', false() )
- $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
- $children = fetch( 'content', 'list', hash( 'parent_node_id', $home_page_root_node_id,
- 'class_filter_type', 'include',
- 'class_filter_array', $home_page_fetch_classes,
- 'attribute_filter', array( array( 'section', '=', '12' ) ),
- 'offset', $view_parameters.offset,
- 'sort_by', $home_page_fetch_sort_array,
- 'ignore_visibility', false(),
- 'depth', $home_page_fetch_depth,
- 'limit', $page_limit ) )}
+ {def $children_count=fetch( 'content', 'list_count', hash( 'parent_node_id', $home_page_root_node_id,
+ 'attribute_filter', array( array( 'section', '=', $home_page_section_forums ) ),
+ 'depth', $home_page_fetch_depth ) )}
+ {def $home_page_fetch_sort_array_published = array( 'published', false() )
+ $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
+ $children = fetch( 'content', 'list', hash( 'parent_node_id', $home_page_root_node_id,
+ 'class_filter_type', 'include',
+ 'class_filter_array', $home_page_fetch_classes,
+ 'attribute_filter', array( array( 'section', '=', $home_page_section_forums ) ),
+ 'offset', $view_parameters.offset,
+ 'sort_by', $home_page_fetch_sort_array,
+ 'ignore_visibility', false(),
+ 'depth', $home_page_fetch_depth,
+ 'limit', $page_limit ) )}
+ {* Projects.ez.no Forums Root Node *}
{elseif $home_page_root_node_id|eq( $projects_forum_node_id )}
- {def $children_count=fetch( 'content', 'list_count', hash( 'parent_node_id', $projects_forum_node_id,
- 'class_filter_type', 'include',
- 'class_filter_array', $home_page_fetch_classes,
- 'attribute_filter', array( array( 'section', '=', '12' ) ),
- 'depth', $home_page_fetch_depth ) )}
- {def $home_page_fetch_sort_array_published = array( 'published', false() )
- $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
- $children = fetch( 'content', 'list', hash( 'parent_node_id', $projects_forum_node_id,
- 'class_filter_type', 'include',
- 'class_filter_array', $home_page_fetch_classes,
- 'attribute_filter', array( array( 'section', '=', '12' ) ),
- 'offset', $view_parameters.offset,
- 'sort_by', $home_page_fetch_sort_array,
- 'ignore_visibility', false(),
- 'depth', $home_page_fetch_depth,
- 'limit', $page_limit ) )}
+ {def $children_count=fetch( 'content', 'list_count', hash( 'parent_node_id', $projects_forum_node_id,
+ 'class_filter_type', 'include',
+ 'class_filter_array', $home_page_fetch_classes,
+ 'attribute_filter', array( array( 'section', '=', $home_page_section_forums ) ),
+ 'depth', $home_page_fetch_depth ) )}
+ {def $home_page_fetch_sort_array_published = array( 'published', false() )
+ $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
+ $children = fetch( 'content', 'list', hash( 'parent_node_id', $projects_forum_node_id,
+ 'class_filter_type', 'include',
+ 'class_filter_array', $home_page_fetch_classes,
+ 'attribute_filter', array( array( 'section', '=', $home_page_section_forums ) ),
+ 'offset', $view_parameters.offset,
+ 'sort_by', $home_page_fetch_sort_array,
+ 'ignore_visibility', false(),
+ 'depth', $home_page_fetch_depth,
+ 'limit', $page_limit ) )}
+ {* GitHub Root Node *}
{elseif $home_page_root_node_id|eq( $github_node_id )}
-{* Deprecated fetch conditions
- 'class_filter_type', 'include',
- 'class_filter_array', $home_page_fetch_classes,
- 'language', $home_page_post_fetch_language,
- 'ignore_visibility', false(),
-*}
+ {* Deprecated fetch conditions
+ 'class_filter_type', 'include',
+ 'class_filter_array', $home_page_fetch_classes,
+ 'language', $home_page_post_fetch_language,
+ 'ignore_visibility', false(),
+ *}
- {def $children_count=fetch( 'content2', 'list_count', hash( 'parent_node_id', $mirror_node_id,
- 'attribute_filter', array( 'or', array( 'section', '=', '7' ), array( 'section', '=', '10' ) ),
- 'depth', $home_page_fetch_depth ) )}
+ {def $children_count=fetch( 'content2', 'list_count', hash( 'parent_node_id', $mirror_node_id,
+ 'attribute_filter', array( 'or', array( 'section', '=', $home_page_section_github ), array( 'section', '=', $home_page_section_homepageandgithub ) ),
+ 'depth', $home_page_fetch_depth ) )}
- {def $home_page_fetch_sort_array_published = array( 'published', false() )
- $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
- $children = fetch( 'content', 'list', hash( 'parent_node_id', $mirror_node_id,
- 'class_filter_type', 'include',
- 'class_filter_array', $home_page_fetch_classes,
- 'attribute_filter', array( 'or', array( 'section', '=', '7' ), array( 'section', '=', '10' ) ),
- 'offset', $view_parameters.offset,
- 'sort_by', $home_page_fetch_sort_array,
- 'ignore_visibility', false(),
- 'depth', $home_page_fetch_depth,
- 'limit', $page_limit ) )}
+ {def $home_page_fetch_sort_array_published = array( 'published', false() )
+ $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
+ $children = fetch( 'content', 'list', hash( 'parent_node_id', $mirror_node_id,
+ 'class_filter_type', 'include',
+ 'class_filter_array', $home_page_fetch_classes,
+ 'attribute_filter', array( 'or', array( 'section', '=', $home_page_section_github ), array( 'section', '=', $home_page_section_homepageandgithub ) ),
+ 'offset', $view_parameters.offset,
+ 'sort_by', $home_page_fetch_sort_array,
+ 'ignore_visibility', false(),
+ 'depth', $home_page_fetch_depth,
+ 'limit', $page_limit ) )}
+ {* Mirror Root Nodes *}
{elseif $current_node_id|eq( $mirror_node_id )}
-{* Deprecated fetch conditions
- 'class_filter_type', 'include',
- 'class_filter_array', $home_page_fetch_classes,
- 'language', $home_page_post_fetch_language,
- 'ignore_visibility', false(),
-*}
- {def $children_count=fetch( 'content2', 'list_count', hash( 'parent_node_id', $mirror_node_id,
- 'depth', $home_page_fetch_depth ) )}
+ {* Deprecated fetch conditions
+ 'class_filter_type', 'include',
+ 'class_filter_array', $home_page_fetch_classes,
+ 'language', $home_page_post_fetch_language,
+ 'ignore_visibility', false(),
+ *}
+ {def $children_count=fetch( 'content2', 'list_count', hash( 'parent_node_id', $mirror_node_id,
+ 'depth', $home_page_fetch_depth ) )}
- {def $home_page_fetch_sort_array_published = array( 'published', false() )
- $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
- $children = fetch( 'content', 'list', hash( 'parent_node_id', $mirror_node_id,
- 'class_filter_type', 'include',
- 'class_filter_array', $home_page_fetch_classes,
- 'offset', $view_parameters.offset,
- 'sort_by', $home_page_fetch_sort_array,
- 'ignore_visibility', false(),
- 'depth', $home_page_fetch_depth,
- 'limit', $page_limit ) )}
+ {def $home_page_fetch_sort_array_published = array( 'published', false() )
+ $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
+ $children = fetch( 'content', 'list', hash( 'parent_node_id', $mirror_node_id,
+ 'class_filter_type', 'include',
+ 'class_filter_array', $home_page_fetch_classes,
+ 'offset', $view_parameters.offset,
+ 'sort_by', $home_page_fetch_sort_array,
+ 'ignore_visibility', false(),
+ 'depth', $home_page_fetch_depth,
+ 'limit', $page_limit ) )}
+ {* Homepage Root Node - AKA - Default Page *}
{else}
{* Deprecated fetch conditions
- 'class_filter_type', 'include',
- 'class_filter_array', array( $home_page_fetch_classes[0] ),
- 'language', $home_page_post_fetch_language,
- 'depth', $home_page_fetch_depth,
- 'ignore_visibility', false()
+ 'parent_node_id', $current_node.node_id,
+ 'class_filter_type', 'include',
+ 'class_filter_array', array( $home_page_fetch_classes[0] ),
+ 'language', $home_page_post_fetch_language,
+ 'depth', $home_page_fetch_depth,
+ 'ignore_visibility', false()
*}
- {def $children_count=fetch( 'content2', 'list_count', hash( 'parent_node_id', $current_node.node_id,
- 'attribute_filter', array( 'or', array( 'section', '!=', '7' ), array( 'section', '!=', '9' ), array( 'section', '!=', '11' ), array( 'section', '!=', '12' ) ),
- 'depth', $home_page_fetch_depth
- ) )}
+ {def $children_count=fetch( 'content2', 'list_count', hash( 'parent_node_id', $home_page_root_node_id,
+ 'attribute_filter', array( 'and', array( 'section', '!=', $home_page_section_github ), array( 'section', '!=', $home_page_section_planet ), array( 'section', '!=', $home_page_section_issues ), array( 'section', '!=', $home_page_section_forums ) ),
+ 'extended_attribute_filter', hash( 'id', 'BcDateTimeExtendedFilter', 'params', hash( 'published', makedate( 1, 1, currentdate()|datetime( 'custom', '%Y' ) ) ) ),
+ 'depth', $home_page_fetch_depth
+ ) )}
+ {*
{$children_count} -- {$page_limit}
*}
{* Deprecated fetch conditions
'class_filter_type', 'include',
@@ -237,28 +258,37 @@
'ignore_visibility', false(),
*}
- {def $home_page_fetch_sort_array_attribute_ext = array( array( 'attribute', false(), $home_page_blog_post_publication_date_attribute_name ), array( 'attribute', false(), $home_page_forum_topic_publication_date ) )
- $home_page_fetch_sort_array_attribute_blog_only = array( array( 'attribute', false(), $home_page_blog_post_publication_date_attribute_name ), array( 'published', false() ) )
- $home_page_fetch_sort_array_attribute_forum_only = array( array( 'attribute', false(), $home_page_forum_topic_publication_date ), array( 'published', false() ) )
- $home_page_fetch_sort_array_published = array( 'published', false() )
- $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
- $children = fetch( 'content', 'list', hash( 'parent_node_id', $home_page_root_node_id,
- 'attribute_filter', array( 'and', array( 'section', '!=', '7' ), array( 'section', '!=', '9' ), array( 'section', '!=', '11' ), array( 'section', '!=', '12' ) ),
- 'offset', $view_parameters.offset,
- 'sort_by', $home_page_fetch_sort_array,
- 'depth', $home_page_fetch_depth,
- 'limit', $page_limit ) )}
-
- {* Deprecated path exclusion: 'attribute_filter', array( 'and', array( 'section', '!=', '7' ), array( 'path', 'not_like', '*/220/*' --- "$home_page_exclude_parent_content*" ) ), *}
+ {def $home_page_fetch_sort_array_attribute_ext = array( array( 'attribute', false(), $home_page_blog_post_publication_date_attribute_name ), array( 'attribute', false(), $home_page_forum_topic_publication_date ) )
+ $home_page_fetch_sort_array_attribute_blog_only = array( array( 'attribute', false(), $home_page_blog_post_publication_date_attribute_name ), array( 'published', false() ) )
+ $home_page_fetch_sort_array_attribute_forum_only = array( array( 'attribute', false(), $home_page_forum_topic_publication_date ), array( 'published', false() ) )
+ $home_page_fetch_sort_array_published = array( 'published', false() )
+ $home_page_fetch_sort_array = $home_page_fetch_sort_array_published
+ $children = fetch( 'content', 'list', hash( 'parent_node_id', $home_page_root_node_id,
+ 'attribute_filter', array( 'and', array( 'section', '!=', $home_page_section_github ), array( 'section', '!=', $home_page_section_planet ), array( 'section', '!=', $home_page_section_issues ), array( 'section', '!=', $home_page_section_forums ) ),
+ 'extended_attribute_filter', hash( 'id', 'BcDateTimeExtendedFilter', 'params', hash( 'published', makedate( 1, 1, currentdate()|datetime( 'custom', '%Y' ) ) ) ),
+ 'offset', $view_parameters.offset,
+ 'sort_by', $home_page_fetch_sort_array,
+ 'depth', $home_page_fetch_depth,
+ 'limit', $page_limit ) )}
+ {*
{$children|count}
*}
+ {* Deprecated path exclusion: 'attribute_filter', array( 'and', array( 'section', '!=', '7' ), array( 'path', 'not_like', '*/220/*' --- "$home_page_exclude_parent_content*" ) ), *}
{/if}
+
{* Site notice area *}
- {def $notifications=fetch( 'content', 'list', hash( 'parent_node_id', $notifications_node_id,
- 'class_filter_type', 'include',
- 'class_filter_array', $notifications_class,
- 'sort_by', array( 'published', false() ),
- 'limit', 1 ) )}
-
+ {* Deprecated single notification fetch
+ {def $notifications=fetch( 'content', 'list', hash( 'parent_node_id', $notifications_node_id,
+ 'class_filter_type', 'include',
+ 'class_filter_array', $notifications_class,
+ 'sort_by', array( 'published', false() ),
+ 'limit', 1 ) )}
+ *}
+ {def $notifications=fetch( 'hfpfetchrandom', 'list', hash( 'parent_node_id', $notifications_node_id,
+ 'class_filter_type', 'include',
+ 'class_filter_array', $notifications_class,
+ 'sort_by', array( 'published', false() ),
+ 'limit', 1 ) )}
+ {cache-block keys=$notifications expiry=2}
{if and( $notifications|is_array, or( $node.node_id|eq( $mirror_node_id ), $node.node_id|eq( $root_node_id ) ) )}
{foreach $notifications as $notification}
@@ -268,7 +298,8 @@
{/foreach}
{/if}
-
+ {/cache-block}
+ {cache-block keys=$children expiry=2}
{include name=navigator
uri='design:navigator/google.tpl'
page_uri=concat('http://', ezsys( 'hostname' ), $currentPageUri )|ezurl(no)
@@ -285,14 +316,17 @@
Sorry, this category currently has no content. Please try again later.
{/if}
+ {/cache-block}
{/if}
+ {cache-block keys=$children expiry=2}
{include name=navigator
uri='design:navigator/google.tpl'
page_uri=concat('http://', ezsys( 'hostname' ), $currentPageUri )|ezurl(no)
item_count=$children_count
view_parameters=$view_parameters
item_limit=$page_limit}
+ {/cache-block}
{* /if *}