Re: [Cppcms-users] check if file exists in template
Brought to you by:
artyom-beilis
From: Lee E. <lee...@gm...> - 2012-10-01 19:22:49
|
do not do the check in the template - do the check in the method that calls the template - and store the result of your check into the content object you give to the view you can even simply store the link url or the even the link element - and hen remove the if from your template altogether On Sun, Sep 30, 2012 at 1:40 PM, sergey lavrov <ccp...@gm...>wrote: > Dear All! > > I need to check in template if file exists. > What is the best practise to do this? > > Example: > if (file_exists("<%= media %>/css/style.css")) { > <link href="<%= media %>/css/style.css" rel="stylesheet" > type="text/css" /> > } > > Thanks in advance! > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://ad.doubleclick.net/clk;258768047;13503038;j? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- -- lee Lee Elenbaas lee...@gm... |