jarednova
Forum Replies Created
-
This is now resolved in Timber 1.20.0 — thanks @rakesh1247 !
Forum: Plugins
In reply to: [Timber] Render template multiple times per page?@jbchristy hi there! You can return the output via
Timber::compile
instead like so …$output = Timber::compile( $layout_template, $context );
// do other stuff
$output .= Timber::compile( $layout_template, $context );
// etc.echo $output;
Forum: Plugins
In reply to: [Timber] Why is Timber using such an old version of Twig?@gutterboy333 it’s a whole different workflow outside of the WordPress plugin repo. You manage/update through Composer — not the WP plugin dashboard.
With Composer/Packagist it becomes a theme dependency that lives inside your project’s
/vendor
directory. Here’s a setup guide from Timber:Forum: Plugins
In reply to: [Timber] Why is Timber using such an old version of Twig?@gutterboy333 we distribute the WP.org version to work with PHP 5.6. Unfortunately that means we have to use Twig 1.x.
HOWEVER, you can use Twig 2.x by installing through Composer!
https://packagist.org/packages/timber/timberForum: Plugins
In reply to: [Timber] WordPress 5.3 compatibility@zsoltbarat everything should work with 5.3! The readme just needed to be updated. We’re working now to integrate of some of the new methods that are now available into the codebase so future versions take full advantage of WordPress’s new functionality.
Forum: Plugins
In reply to: [Timber] Timber version 1.11.0 warning@henrywright this is just a catch-all advisement about upgrading Timber. Since it’s just handling template processing, there’s no real benefit to upgrading if everything is stable. It’s not like an old site will suddenly become better because it went from version 1.8 to 1.12, but there will become a big risk that old functionality has been tweaked over those versions in a way that (unintentionally) breaks something on the site.
Thus, we advise to only upgrade if you’re in the midst of active development and will receive the benefit of new features and patches
Forum: Plugins
In reply to: [Timber] Timber include 2x times direcotry “lib”Thank you @bartbury! I removed the duplicate directory — really appreciate the heads-up!
Forum: Plugins
In reply to: [Timber] Parse error on “new \Timber\Timber”Glad to hear @dparvanova! Yes, Timber requires PHP 5.3
Forum: Plugins
In reply to: [Timber] Creating a TimberObject within twig fileTwo ways…
{{ post.parent.title }}
{{ Post(post.post_parent).title }}
Forum: Plugins
In reply to: [Timber] Using Timber Routes in Plugin@timlogemann I’d recommend using the Routes plugin:
https://github.com/upstatement/routes
… we’ve deprecated the routing features of Timber for now (they’ll still be there for a while, but no new features/improvements). Routes is probably the best way forward for you plugin!
Forum: Plugins
In reply to: [Timber] display_dateYes, display_date was removed. But
{{ post.date }}
or{{ post.post_date|date }}
will do the trick.Forum: Plugins
In reply to: [Timber] Dashes in field names@ageibert —?I was about to tell you to avoid using dashes in fields. I didn’t realize Twig supported array notation. Good find!
Forum: Plugins
In reply to: [Timber] 1.0.2 update error… and it’s now deployed as 1.0.3!
Forum: Plugins
In reply to: [Timber] 1.0.2 update errorthanks @christianjameswagnergmailc I’m working on a hot fix right now that will resolve that!
Forum: Plugins
In reply to: [Timber] get_comment_form() returns empty@carlosreynolds @oxyplay: The new version of Timber (1.0.2) restores the old comment_form function and adds a new
{{ post.comment_form }}
method