For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > December 2006 > Re: [SMARTY] include_block









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] include_block
Paul Pogonyshev

2006-12-21, 7:08 pm

[I assume this was meant for general public]

Allen Shaw wrote:
> Paul Pogonyshev wrote:
>
> How about :
>
> {capture name=lorem}
> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
> eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
> enim ad minim veniam, quis nostrud exercitation ullamco laboris
> nisi ut aliquip ex ea commodo consequat.
> {/capture}
>
> {include file="my-cute-side-block" contents=$smarty.capture.lorem}


Yes, it is possible. However, I think it is not very clean since it
requires two tags and intention is less obvious from reading the code.
Proposed new tag doesn't really add new functionality, but should be
trivial to implement. (Implementing it as plugin is not clean because
_smarty_include() is not exposed in the public interface.)

Paul
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com