Re: [Cppcms-users] render sub-template without parents
Brought to you by:
artyom-beilis
|
From: Lee E. <le...@el...> - 2014-10-21 07:54:14
|
take a look at the generated c++ code generate from a template - you will see how a template can inherit from another, and override it i am not free to take a look myself right now, i will try to give a more complete answer later On Mon, Oct 20, 2014 at 3:11 PM, bibermann <fab...@gm...> wrote: > 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 > > > > ------------------------------------------------------------------------------ > 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 list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |