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

Iterate through content blocks #26

Open
gg4u opened this issue Nov 22, 2019 · 1 comment
Open

Iterate through content blocks #26

gg4u opened this issue Nov 22, 2019 · 1 comment

Comments

@gg4u
Copy link

gg4u commented Nov 22, 2019

I would like to iterate with something like:

{% for block in contentblock %}
    <section>
        {% contentblock block %}
    </section>
{% endfor %}

or even better

# iterate through contenblock of type "sidebar" that are specified in the md file like : 
# {% contentfor sidebar %}
# my text for FIRST sidebar block
# {% endcontentfor %}

# {% contentfor sidebar %}
# my text for SECOND sidebar block
# {% endcontentfor %}

{% for block in contentblock sidebar %}
    <section>
        {% contentblock block %}
    </section>
{% endfor %}

It would be very useful for when you need to compose a page passing an md file, and assign types of blocks to the layout.

So one could only edit the text file.

Any possibility to do it ?

@stellarpower
Copy link

stellarpower commented Nov 23, 2019

Hello, as it turns out, I think I already came to the same issue as you have, and managed to implement most of this. Unfortunately circumstances changed and because I wasn't very good with git at the time I just backed up the folder occasionally, so afraid I got lost in a big effort to tidy-up my code and it's been shelved for about a year. But I hope to clear out some of my code soon so will try and get the pull request submitted finally!

@rustygeldmacher IDK if I can't seem to assign myself as it's not my repo or just as it's the mobile interface but feel free to do so if you like and I'll reference and close this off once I get the PR through.

Thanks :D

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

2 participants