twig and prosilver

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
Sajaki
Registered User
Posts: 1314
Joined: Mon Mar 02, 2009 1:41 pm
Name: Andreas
Contact:

twig and prosilver

Post by Sajaki » Sun Oct 08, 2017 10:42 pm

hi,

Does it make sense for a new style to inherit html from prosilver but write the custom html in twig ? it seems to me twig should be better used in new 3.2 standalone styles.

User avatar
canonknipser
Registered User
Posts: 1131
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: twig and prosilver

Post by canonknipser » Mon Oct 09, 2017 11:08 am

Sajaki wrote:
Sun Oct 08, 2017 10:42 pm
Does it make sense for a new style to inherit html from prosilver but write the custom html in twig
Yes
Greetings
Frank
phpbb.de support team member
English is not my native language
New arrival - Extensions and scripts for phpBB
no support via PM or mail

User avatar
david63
Jr. Extension Validator
Posts: 12940
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: twig and prosilver

Post by david63 » Mon Oct 09, 2017 12:02 pm

Sajaki wrote:
Sun Oct 08, 2017 10:42 pm
write the custom html in twig
Twig is not a substitute for HTML but is a templating engine that allows you to control the output of the template data within HTML
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email or as they will be ignored

Sajaki
Registered User
Posts: 1314
Joined: Mon Mar 02, 2009 1:41 pm
Name: Andreas
Contact:

Re: twig and prosilver

Post by Sajaki » Mon Oct 09, 2017 12:36 pm

Sajaki wrote:
Sun Oct 08, 2017 10:42 pm
but write the custom html in twig ?
i meant the phpbb template syntax, like <!-- IF -->.

Since Prosilver 3.2 base style has phpbb template syntax everywhere, would it be not an issue to have an prosilver inherited style with Twig template constructs.

User avatar
canonknipser
Registered User
Posts: 1131
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: twig and prosilver

Post by canonknipser » Mon Oct 09, 2017 12:40 pm

ALL phpBB-template files are translated to TWIG-Syntax (and stored in the cache) before being processed, so there is no issue when you inherit a style from prosilver and use TWIG in your inherited style files.

AFAIK it is even possible to mix pphBB- and TWIG-syntax in the same template fie.
Greetings
Frank
phpbb.de support team member
English is not my native language
New arrival - Extensions and scripts for phpBB
no support via PM or mail

User avatar
david63
Jr. Extension Validator
Posts: 12940
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: twig and prosilver

Post by david63 » Mon Oct 09, 2017 12:58 pm

canonknipser wrote:
Mon Oct 09, 2017 12:40 pm
AFAIK it is even possible to mix pphBB- and TWIG-syntax in the same template fie
Up to a point it is - you cannot, for example, have an opening IF tag in one syntax and the corresponding closing tag in the other syntax.

However it is not considered good practice to mix the two within a file and in fact mixing is not allowed in extensions that are in the CDB.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email or as they will be ignored

User avatar
Hanakin
Infrastructure Team Member
Infrastructure Team Member
Posts: 547
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: twig and prosilver

Post by Hanakin » Mon Oct 09, 2017 5:12 pm

just do it all in twig!

Post Reply

Return to “[3.2.x] Styles Support & Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests