Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

want to convert render html to nunjucks with variable and every thing. #1427

Open
shoaib3456 opened this issue Dec 6, 2022 · 0 comments
Open

Comments

@shoaib3456
Copy link

shoaib3456 commented Dec 6, 2022

becuase i want to manuplate/add some html tags after html render and save into nunjucks (like before rendering);

nunjucks before render

<div class="ps-4">
        <h1>{{heading}}</h1>
        {% if isShowLi %}
            <div class="px-4">
                {% for item in items %}
                    <div>{{item.name}}</div>
                {% endfor %}
            </div>
        {% endif %}
</div>

nunjucks after render and html modification

<div class="ps-4">
        <h1>hello world</h1>
          <img src="abc.png" />
            <div class="px-4">
                    <div>item 1</div>
                    <div>item 2</div>
                    <div>item 3</div>
                    <div>item 4</div>
                    <div>item 5</div>
            </div>
 </div>

and i want it like that

<div class="ps-4">
        <h1>{{heading}}</h1>
       <img src="abc.png" />
        {% if isShowLi %}
            <div class="px-4">
                {% for item in items %}
                    <div>{{item.name}}</div>
                {% endfor %}
            </div>
        {% endif %}
 </div>

please solve and suggest any way to do this thing pleassssss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant