• 23-01-2024, 17:53:46
    #1
    Merhabalar;
    ejs tabanlı bu dosyada description karakter sınırlaması atamak istiyorum örneğin max 90 karakter olsun.
    Nasıl yaparım yapamadım bi türlü.
    <% for (let i = 0; i < product.length; i++) { %>
                            ....
                                <div class="p-4 tm-bg-gray tm-catalog-item-description">
                                    <h3 class="tm-text-primary mb-3 tm-catalog-item-title"><%= product[i].title %></h3>
                                    <p class="tm-catalog-item-text"><%= product[i].description %></p>
                                </div>
                           ....
                            <% } %>
  • 23-01-2024, 17:55:13
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    <% for (let i = 0; i < product.length; i++) { %>
        ...
        <div class="p-4 tm-bg-gray tm-catalog-item-description">
            <h3 class="tm-text-primary mb-3 tm-catalog-item-title"><%= product[i].title %></h3>
            <p class="tm-catalog-item-text">
                <%= product[i].description.length > 90 ? product[i].description.substring(0, 90) + '...' : product[i].description %>
            </p>
        </div>
        ...
    <% } %>
  • 23-01-2024, 17:57:01
    #3
    adwerd0z1 adlı üyeden alıntı: mesajı görüntüle
    <% for (let i = 0; i < product.length; i++) { %>
        ...
        <div class="p-4 tm-bg-gray tm-catalog-item-description">
            <h3 class="tm-text-primary mb-3 tm-catalog-item-title"><%= product[i].title %></h3>
            <p class="tm-catalog-item-text">
                <%= product[i].description.length > 90 ? product[i].description.substring(0, 90) + '...' : product[i].description %>
            </p>
        </div>
        ...
    <% } %>
    Eywallah Kral