Re: [Cppcms-users] render sub-template without parents
Brought to you by:
artyom-beilis
|
From: bibermann <fab...@gm...> - 2014-10-20 12:12:14
|
Lee Elenbaas <lee@...> writes: > > > Template hirarchi translates to class hirarchi, with methods > You can call the news method from two templates, one as part of a full page and another as partial > בתאריך 15 באוק 2014 17:45, "bibermann" <fabianvss- Re5...@pu...> כתב:Hello, > I'm going to use CppCMS for an Ajax-driven site and am wondering whether it's > possible to only return the HTML for a sub-template. > Considering the example given inhttp://cppcms.com/wikipp/en/page/cppcms_1x_tut_templates_inheritance > where we have the following template hierarchie: > master > / | \ > news page intro > I want to be able to both render the news normally and as part of an ajax > request to update the news item without reloading the full page, i.e. > returning page_content() of this template. > Can I achieve this functionality with CppCMS or do I need to create two > version of "news"? > Thanks in advance, > bibermann > -------------------------------------------------------------------------- ---- > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device.http://p.sf.net/sfu/Zoho > _______________________________________________ > Cppcms-users mailing listCppcms-users- 5NW...@pu...://lists.sourceforge.net/lists /listinfo/cppcms-users > > > > > -------------------------------------------------------------------------- ---- > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > > -------------------------------------------------------------------------- ---- > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho Sorry, I did not understand. Which function do you mean? I think I cannot access the News instance from within the Code. If this does not work I would linke to somehow include a separate template (like #include but at template-compile time - I didn't found a possibility to do this). Regards, bibermann |