Jump to content

Featured Replies

Posted
comment_211215

Hello everyone, on this occasion I would like to implement or call some functions or items to the footer, I would like to know how I could implement it and how to call that information or result

For example I would like to call the total number of members or how many posts have been created, call different statistics. Add all this in the footer, of course, Thank you very much in advance.

Цитата

image.png.b2af2a84a6fed877999b40fd5f08cc38.png

 

  • Author
comment_211313

What I want is to call that statistic and put it in the footer.

I know which plugin it is, but how do I get that information and show it at the beginning or in the footer?

comment_211322

переместите этот код из globalTemplate в core>front>global>footer внизу

{template="widgetContainer" group="global" app="core" params="'footer', 'horizontal'"}

но тогда там будут отображаться все горизонтальные виджеты

comment_211323

Вариант 2 .... 

создать новый HTML-шаблон ... widgetContainerS

{template="widgetContainerS" group="global" app="core" params="'footer', 'horizontal'"}

в этот шаблон вставьте этот код

{{if $id == 'header'}}
	{template="announcementContentTop" app="core" group="global" params=""}
{{endif}}
{{if ( isset( \IPS\Output::i()->sidebar['widgets'][ $id ] ) && \count( \IPS\Output::i()->sidebar['widgets'][ $id ] ) ) || ( \IPS\Dispatcher::i()->application instanceof \IPS\Application AND \IPS\Dispatcher::i()->application->canManageWidgets() )}}
	<div class='cWidgetContainer {{if !isset( \IPS\Output::i()->sidebar['widgets'][ $id ] ) or !\count( \IPS\Output::i()->sidebar['widgets'][ $id ] )}}ipsHide{{endif}}' {{if \IPS\Dispatcher::i()->application->canManageWidgets()}}data-controller='core.front.widgets.area'{{endif}} data-role='widgetReceiver' data-orientation='{$orientation}' data-widgetArea='{$id}'>
		<ul class='ipsList_reset'>
			{{if isset( \IPS\Output::i()->sidebar['widgets'][ $id ] )}}
				{{foreach \IPS\Output::i()->sidebar['widgets'][ $id ] as $widget}}
					{{$widgetHtml = (string) $widget;}}
					<li class='ipsWidget ipsWidget_{$orientation} {{if !\in_array( 'IPS\Widget\Builder', class_implements( $widget ) )}}ipsBox{{endif}} {{if trim( $widgetHtml ) === ''}} ipsWidgetHide ipsHide{{endif}} {{if isset($widget->configuration['devices_to_show'])}}ipsResponsive_block{{foreach array_diff( array( 'Phone', 'Tablet', 'Desktop' ), $widget->configuration['devices_to_show'] ) as $device }} ipsResponsive_hide{$device}{{endforeach}}{{endif}}' data-blockID='{{if isset($widget->app) AND !empty($widget->app)}}app_{$widget->app}_{{else}}plugin_{$widget->plugin}_{{endif}}{$widget->key}_{$widget->uniqueKey}'{{if $widget->hasConfiguration()}} data-blockConfig="true"{{endif}} data-blockTitle="{lang="block_{$widget->key}"}" data-blockErrorMessage="{lang="$widget->errorMessage" escape="true"}" {{if \in_array( 'IPS\Widget\Builder', class_implements( $widget ) )}}data-blockBuilder="true"{{endif}} data-controller='core.front.widgets.block'>{$widgetHtml|raw}</li>
				{{endforeach}}
			{{endif}}
		</ul>
	</div>
{{endif}}

затем поместите шаблон в нижний колонтитул

comment_211329
44 minutes ago, Silence said:

Option 2 .... 

create a new HTML template ... widgetContainerS

paste this code into this template


	  
					 configuration['devices_to_show'])}}ipsResponsive_block{{foreach array_diff( array( 'Phone', 'Tablet', 'Desktop' ), $widget->configuration['devices_to_show'] ) as $device }} ipsResponsive_hide{$device}{{endforeach}}{{endif}}' data-blockID='{{if isset($widget->app) AND !empty($widget->app)}}app_{$widget->app}_{{else}}plugin_{$widget->plugin}_{{endif}}{$widget->key}_{$widget->uniqueKey}'{{if $widget->hasConfiguration()}} data-blockConfig="true"{{endif}} data-blockTitle="{lang="block_{$widget->key}"}" data-blockErrorMessage="{lang="$widget->errorMessage" escape="true"}" {{if \in_array( 'IPS\Widget\Builder', class_implements( $widget ) )}}data-blockBuilder="true"{{endif}} data-controller='core.front.widgets.block'>{$widgetHtml|raw}</li>
		
	

then place the template in the lower column

I can confirm this is working I just added it to my website thanks silence for the help.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.


Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.