|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Tipo Smarty n00b
Joined: 19 Sep 2014 Posts: 4
|
Posted: Fri Sep 19, 2014 2:02 pm Post subject: How to fetch content from Smarty Block? |
|
|
Hi there,
I'm a totally Newbie with Smarty.
When I want to read the whole template file with PHP, is it possible just to say I want only get the content of one block inside that tpl-file?
Something like
$Smarty->get($blockname, $filename);
Or have I to parse the whole file and search the blocks I need to get the contents? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Sep 20, 2014 11:56 am Post subject: |
|
|
That is currently not possible, but I did put it on the wishlist. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Sat Sep 20, 2014 4:04 pm Post subject: |
|
|
What is the use case for this? |
|
Back to top |
|
Tipo Smarty n00b
Joined: 19 Sep 2014 Posts: 4
|
Posted: Sat Sep 20, 2014 11:53 pm Post subject: |
|
|
A Use Case is e.g. to call a preDispatcher that need some informations depending on the content from some special blocks. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue Sep 30, 2014 2:15 pm Post subject: |
|
|
That's rather vague statement.
Will that be rendered content, or raw template code?
Can you provide an example? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|