Welcome Guest, Not a member yet? Register   Sign In
how to place some php decision code insite a template iteration
#5

[eluser]dvogel[/eluser]
[quote author="jnickerson" date="1200529877"]Couldn't you do this in the controller? Before you post to the $data array just determine if the truncating should happen and then the view won't need any php conditionals. This would probably be the preferred method since you are separating the logic from the view.[/quote]
Yes I know but the 'read more' link should not be after the text but at the right. I could build the html in the controller and just put the html in the view using the template parser.

I still find I easier to do in the view, its not realy business logic but more presentation logic. But when its not possible, I have no option


Messages In This Thread
how to place some php decision code insite a template iteration - by El Forum - 01-16-2008, 12:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB