What means <!-- in templates page
					Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
	Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- AmzoooJibal
 - Posts: 35
 - Joined: 12 Mar 2021, 20:09
 
What means <!-- in templates page
Hello,
what is the role of <!-- in templates pages ? for example in the count collection of supplier i have this javascript code:
where and when this code are executed ? and what is the role of <!--  in template page ?
			
			
			
									
									
						what is the role of <!-- in templates pages ? for example in the count collection of supplier i have this javascript code:
Code: Select all
<?php $this->block()->start( 'catalog/count/supplier' ) ?>
// <!--
var supplierCounts = <?= $this->get( 'supplierCountList', map() )->toJson( JSON_FORCE_OBJECT ) ?>;
$( ".catalog-filter-supplier .supplier-lists li.attr-item" ).each( function( index, item ) {
	$(item).append( function() {
		var itemId = $(this).data( "id" );
		if( supplierCounts[itemId] ) {
			var node = document.createElement( 'span' );
			node.appendChild( document.createTextNode( supplierCounts[itemId] ) );
			$(node).addClass( 'attr-count' );
			return node;
		}
		$(this).addClass( 'disabled' );
	});
});
// -->
<?php $this->block()->stop() ?>
- AmzoooJibal
 - Posts: 35
 - Joined: 12 Mar 2021, 20:09
 
Re: What means <!-- in templates page
for the first question, the supplier count is executed by the javascript in the header of filter :
this filter get all count html (in this case javascript).
I have just one more question is there any role of <!-- ? i can delete them ?
			
			
			
									
									
						Code: Select all
<?php if( ( $url = $this->get( 'filterCountUrl' ) ) != null ) : ?>
	<script defer src="<?= $enc->attr( $url ) ?>"></script>
<?php endif ?>I have just one more question is there any role of <!-- ? i can delete them ?
Re: What means <!-- in templates page
Code: Select all
// <!--
...
// -->
Professional support and custom implementation are available at  Aimeos.com
If you like Aimeos,
 give us a star
						If you like Aimeos,