Giter Site home page Giter Site logo

Dynamic Table Columns about sablon HOT 3 CLOSED

jppribeiro avatar jppribeiro commented on July 17, 2024
Dynamic Table Columns

from sablon.

Comments (3)

stadelmanma avatar stadelmanma commented on July 17, 2024

@jppribeiro I'm not sure home complex your formatting is but I would probably use HTML insertion instead. Basically you'd need a "pre-processing" step where you generate the desired table in HTML and then use that in your context instead of trying to do it with loops.

Off the top of my head I don't know if it's possible to generate extra columns in a for loop since I don't remember the XML format for tables. Even if the XML is agreeable it might be hard to get your merge fields in the right places.

from sablon.

jppribeiro avatar jppribeiro commented on July 17, 2024

@stadelmanma That's exactly what I decided to do. I'm building the table structure with Nokogiri, converting it into html and using that in the context.

Thanks for answering so fast!

from sablon.

stadelmanma avatar stadelmanma commented on July 17, 2024

Glad you found a working solution. HTML insertion isn't perfect but the code I've written that uses sablon takes advantage of it extensively (actually, excessively).

from sablon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.