render_maybe on version 5 (tiger) problem.

41 views
Skip to first unread message

Renato Forti

unread,
Sep 11, 2014, 5:16:35 PM9/11/14
to mojol...@googlegroups.com
Hi All,

I use a lot of :

$self->render maybe('body' . '-' . $language , partial => 1);

In version 4.90, I have my page rendered as expected, but not in version 5, I see the number '1 ' instead my template!

What happens?

Thanks

Виктор Турский

unread,
Sep 11, 2014, 6:02:27 PM9/11/14
to Mojolicious
2014-09-12 0:16 GMT+03:00 Renato Forti <rtf...@gmail.com>:
> partial => 1
"partial" was removed in 5.0: "Replaced reserved stash value partial
with render_to_string method."



--
Viktor Turskyi
http://webbylab.com
http://koorchik.blogspot.com

Renato Forti

unread,
Sep 11, 2014, 6:54:29 PM9/11/14
to mojol...@googlegroups.com

How I can do this? Any sample? Thanks for your help!

--
You received this message because you are subscribed to a topic in the Google Groups "Mojolicious" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mojolicious/KRFMV9e_rPA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mojolicious...@googlegroups.com.
To post to this group, send email to mojol...@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Mark Dueck

unread,
Sep 11, 2014, 9:36:18 PM9/11/14
to mojol...@googlegroups.com
This change caught me also, you have 2 options in a template (as far as I know):

%= include(’template’);

This is a helper which internally calls:

%= $self->render_to_string(‘template’);

replacing:
%= $self->render(‘template’, partial => 1);

Docs:
http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Including-partial-templates

Cheers,
Mark Dueck
Email: ma...@opmantek.com
Skype: mark_dueck
Cell: 0411 620 778

You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious...@googlegroups.com.

Renato Forti

unread,
Sep 11, 2014, 9:42:36 PM9/11/14
to mojol...@googlegroups.com

Thanks a lot :)

sri

unread,
Sep 11, 2014, 10:02:46 PM9/11/14
to mojol...@googlegroups.com
Doesn't anyone use the search function anymore? I literally just typed "5.0" into the box an hit enter...


--
sebastian
Reply all
Reply to author
Forward
0 new messages