{serendipity_hookPlugin hook="entries_footer"}
{serendipity_hookPlugin hook="entries_footer"}
I'm just wondering if {serendipity_hookPlugin hook="entries_footer"} will ever produce any actual output in entries_archives.tpl or entries_summary.tpl.
Doesn't seem like it as far as I have seen - why are these in there anyway?
YL
Doesn't seem like it as far as I have seen - why are these in there anyway?
YL
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: {serendipity_hookPlugin hook="entries_footer"}
Hi!
I have coded custom templates with specific plugins that use this hook on pages like these. Other people might have as well; just because spartaucs s9y plugins don'T use it, mustn't mean that other installations don't have custom plugins that specifically output stuff on these pages.
Regards,
Garvin
I have coded custom templates with specific plugins that use this hook on pages like these. Other people might have as well; just because spartaucs s9y plugins don'T use it, mustn't mean that other installations don't have custom plugins that specifically output stuff on these pages.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: {serendipity_hookPlugin hook="entries_footer"}
Digging this up again: Is there any (preferably Smarty) way to check whether the hook actually gives something back?
YL
YL
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: {serendipity_hookPlugin hook="entries_footer"}
Hi!
You could maybe use {capture} around the hook execution and check if the output is != ''...?!
Regards,
Garvin
You could maybe use {capture} around the hook execution and check if the output is != ''...?!
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: {serendipity_hookPlugin hook="entries_footer"}
Weird.
If I, i.e. use this in the entries.tpl:
it still emits "my conditional smarty code" even if $smarty.capture.foo is empty ... am I using this the wrong way?
YL
If I, i.e. use this in the entries.tpl:
Code: Select all
{capture name="foo"}
{serendipity_hookPlugin hook="entries_footer"}
{/capture}
{if $smarty.capture.foo != ''}
{* my conditional smarty code *}
{/if}
YL
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: {serendipity_hookPlugin hook="entries_footer"}
Try this:
It is also possible that {if $foo} will evalutate to true if it is not blank... didn't test it.
Code: Select all
{capture assign='foo'}
{serendipity_hookPlugin hook="entries_footer"}
{/capture}
{if $foo !=''}
....
{/if}
=Don=
Re: {serendipity_hookPlugin hook="entries_footer"}
Silly me. That's working. Thanks.
YL
YL
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: {serendipity_hookPlugin hook="entries_footer"}
Glad it worked. Exciting new template coming together?
=Don=
Re: {serendipity_hookPlugin hook="entries_footer"}
More like boring, rather simple new template coming together.Don Chambers wrote:Exciting new template coming together?
YL
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: {serendipity_hookPlugin hook="entries_footer"}
Well, it is better than sitting around doing nothing!yellowled wrote:More like boring, rather simple new template coming together.
=Don=
Re: {serendipity_hookPlugin hook="entries_footer"}
Actually, no, it's not. Still does not emit the hook results, even if there are any.yellowled wrote:That's working.
But never mind, I found another solution for this particular project.
YL
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: {serendipity_hookPlugin hook="entries_footer"}
Its not going to emit the results, unless you emit them because the results were captured and assigned to {$foo}.yellowled wrote:Actually, no, it's not. Still does not emit the hook results, even if there are any.
So, if you want the results displayed together with some other conditional thing, you should do:
Code: Select all
{capture assign='foo'}
{serendipity_hookPlugin hook="entries_footer"}
{/capture}
{if $foo !=''}
<p>{$foo}</p> {* if you need it as its own element *}
{* your conditional smarty code *}
{/if}
=Don=