Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [SMARTY] includes
You can do it in php with switch and assign $reports variable to the smarty.
. the only thing is
then programmer decides what should be done on the template.


{include file=$reports}

pete M <pmorgan@ukds.net>:

> is there a more elegant way to code below..The variable companed is also
> tpart of the file name
>
> {if $report_type == 'general'}
> 	{include file="reports.general.inc.html"}
>
> {elseif $report_type == 'ppm'}
> 	{include file="reports.ppm.inc.html"}
>
> {elseif $report_type == 'finance'}
> 	{include file="reports.finance.inc.html"}
>
> {elseif $report_type == 'testing'}
> 	{include file="reports.testing.inc.html"}
> {/if}
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Zoran Knezevic
09-02-04 09:01 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:58 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.