Re: [jgen] Code Format

10 views
Skip to first unread message

bdeck...@gmail.com

unread,
Dec 31, 2024, 2:03:09 PM12/31/24
to joomla-de...@googlegroups.com, Joomla! General Development
Most likely that it's your CR/LF line terminators being munged.  This can be the result of the settings in your code editor,and/ or the FileZilla settings.   It is annoying when it happens.  I wrote myself a little script to fix line terminators if and when this happens. 
Sent from my iPhone

On Dec 30, 2024, at 9:43 AM, Harold Smith <haroldscot...@gmail.com> wrote:

Hello,
I am experiencing unformatted code when uploading or downloading files to and from my hosting provider using FileZilla. Does anyone know why this occurs? The code is written using the Liquid template language.

Before:
<ul class="list-unstyled list-products">
{% for product in products %}
<li class="row mb-4">
<div class="col-6 col-sm-3">
<div class="product-image">
{% if product.stickers %}
<!-- Stickers -->
<ul class="stickers">
{% if product.new %}
<li>
<span class="product-label product-label_new">NEW</span>
</li>
{% endif %}
{% if product.hit %}
<li>
<span class="product-label product-label_hit">HIT</span>
</li>
{% endif %}
{% if product.discount %}
<li>

After:

<ul class="list-unstyled list-products"> {% for product in products %} <li class="row mb-4 col-sm-12 items-list-layout"> <div class="col-md-3 list-image-block"> <div class="product-image"> {% if product.stickers %} <!-- Stickers --> <ul class="stickers"> {% if product.new %} <li> <span class="product-label product-label_new">NEW</span> </li> {% endif %} {% if product.hit %} <li> <span class="product-label product-label_hit">HIT</span> </li> {% endif %} {% if product.discount %} <li> {% assign options = 'decimals' | arrayCombine: 0 %} {% if product.discount_image %} <img {{ product.discount_image | img_exists: '30x30' }} alt="" title="{{ product.discount_desc }} - {{ product.discount | costDisplay: options }}{{ product.d_symbol }}"> {% else %} <span class="product-label" title="{{ product.discount_desc }} - {{ product.discount | costDisplay: options }}{{ product.d_symbol }}"> -{{ product.discount | costDisplay: options }}{% if product.d_symbol == '%' %}{{ product.d_symbol }}{% endif %}

I would be Grateful for any suggestions.
Thank you in advance.

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/joomla-dev-general/931fb9d8-5f38-430e-a1d2-09bb61885c58n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages