stacey icon indicating copy to clipboard operation
stacey copied to clipboard

Toying with twig

Open bumpux opened this issue 14 years ago • 4 comments

Hey there. I really like the new changes and am getting to know them a bit.

Exploring the Twig docs I came on the "extends" tag and thought I'd attempt a slight restructure on my Stacey fork:

  • new directory (templates/base) includes base.twig. Kind of a meta-template. It includes the outer html skeleton and blocks for title, content and footer.
  • Blocks in a .twig can be inherited and-or extended by the revised default.html, page.html. and project.html.

I wonder if you thought of this approach already? In any case I thought you might like to take a look.

bumpux avatar Feb 07 '12 20:02 bumpux

I was actually just playing around with this the other day. It's really powerful. My only concern is that template inheritance might confuse the more non-technical users if we put it in the default template. What are your thoughts?

kolber avatar Feb 08 '12 23:02 kolber

I see your point that it may intimidate some users or overcomplicate the default. Twig has a lot more power/complexity beyond extending templates, which more adventurous users can explore (assuming you're including access to all of Twig's feature set). So now that I think about it maybe this doesn't belong in the default template. But a new alternate template showing this feature could be valuable. I'm hoping to be ready to submit such a thing pretty soon for your evaluation, hopefully including some responsive design elements too ...

On Wed, Feb 8, 2012 at 3:32 PM, Anthony Kolber [email protected] wrote:

I was actually just playing around with this the other day. It's really powerful. My only concern is that template inheritance might confuse the more non-technical users if we put it in the default template. What are your thoughts?


Reply to this email directly or view it on GitHub: https://github.com/kolber/stacey/pull/34#issuecomment-3878813

bumpux avatar Feb 10 '12 00:02 bumpux

Yea, I think that would be the perfect approach. Looking forward to seeing what you come up with!

kolber avatar Feb 10 '12 06:02 kolber

I would love to see a template with advanced twig functionality, it would be a great learning tool.

gregcoleinfo avatar Oct 07 '12 02:10 gregcoleinfo