Please take note of today's Git and you need to run The Site Links Administration ONCE to get your site upgraded if you sync files beyond today.
New Site Links Administration is Full powerhouse. I put in every single thing I can do into 1 whole admin.. From quick edit to filters and sub child filters and even unpublish and publish are all in. The upgrade will involve adding "link_status" column into DB_SITE_LINKS (type SMALLINT(1) UNSIGNED NOT NULL DEFAULT '0') after link_visibility column.
The showsublinks() function is now a single line, old codes totally wiped out because the new links interface will support multiple object with different types of data. I.e. you can run showsublinks() like 10 times in a single page, and 10 of it will be different (depending on your usage). The documentation and implementation are shown in FusionTheme. For each showsublinks(), is differentiated by its default 'ID". So please take note on how to customize the ID of each individual showsublinks().
On New upgrade, all your EXISTING links are in UNPUBLISHED state. Go to your sitelinks and Publish Every Single One to turn it back on. From now on, you do not need to delete site ilnks when arranging your site, just unpublish/publish them so you can get a 'feel' of the current state.
You can now also mass delete/move/ links in one shot.
Any links that has sub category will be protected and should not be deleted.
If parent link changed position, all sub links will also change position now. This makes transferring links easier from one ID to another.
PHPFusion 9 showsublinks() is multiple and supports these options parameters:
$default_options = [
'id' => self::MenuDefaultID,
'container' => FALSE,
'responsive' => TRUE,
'navbar_class' => 'navbar-default',
'nav_class' => '',
'additional_nav_class' => '',
'item_class' => '', // $class
'locale' => [],
'separator' => '', // $sep
'links_per_page' => '',
'grouping' => '',
'show_banner' => FALSE,
'show_header' => FALSE,
'language_switcher' => FALSE,
'searchbar' => FALSE,
'caret_icon' => 'caret',
'link_position' => [2,3],
];
You got $options like Dynamics, so basic function is:
\PHPFusion\SiteLinks::setSubLinks( $options )->showSubLinks();
It will push the parameter from one function to the end result. OR
echo showsublinks('', '', $options);
will achieve the same result.
For logo: $options['show_header'] AND $options['show_banner']
Explanation:
If show_header is Empty or FALSE, No logo will be shown at all.
If show_header is
not empty, you get 3 choices.
1. First choice, show_banner is true. In this case, we render banner logo
2. Second choice, show_banner is
False, and header is TRUE. (must be TRUE, not 1). Then show sitename text.
3. Third choice, if show_header is
not TRUE but some HTML, Then show the HTML. For example, your <img class='some-special-class' href='not-the-banner-path'>
Please reflect the changes on your custom theme accordingly.
Thanks.