Thread: [Cppcms-users] ERROR: There is no such skin
Brought to you by:
artyom-beilis
From: Renato F. <re....@ay...> - 2011-03-29 19:31:53
|
Hi All, What is this error: "There is no such skin:" I have 2 templates: ----------------------------------------------------------------------------------------------------------- <% c++ #include "HomeContent.h" %> <% skin Home %> <% view home uses Content::HomeContent %> <% template render() %> // HTML ... <% end template %> <% end view %> <% end skin %> ------------------------------------------------------------------------------------------------------------ <% c++ #include "PortalContent.h" %> <% skin Portal %> <% view portal uses Content::PortalContent %> <% template render() %> // HTML ... <% end template %> <% end view %> <% end skin %> ------------------------------------------------------------------------------------------------------------ If I access: Home, al lis ok, but if i call Portal I receive: "There is no such skin:" (no name in the end) and if I remove "HomeSkin.cpp" of my project; Portal work!!! I am confused What is the problem? PS: All files is attached. Thanks |
From: Artyom <art...@ya...> - 2011-03-29 20:40:38
|
When you have more then one skin you need to either specify its name explicitly as parameter to application::render function http://art-blog.no-ip.info/cppcms_ref_v0_99/classcppcms_1_1application.html#a68b4c88d0e81a41474933043690aa1a or you need to set the configuration value views.default_skin See http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_config#views.default_skin (I forgot to document this specific option, I have just added it to the wiki) What is important to understand that if you have different skins you need to select one somehow. Artyom ----- Original Message ---- > From: Renato Forti <re....@ay...> > To: cpp...@li... > Sent: Tue, March 29, 2011 9:31:30 PM > Subject: [Cppcms-users] ERROR: There is no such skin > > Hi All, > > What is this error: > > "There is no such skin:" > > I have 2 templates: > >----------------------------------------------------------------------------------------------------------- >- > > <% c++ #include "HomeContent.h" %> > <% skin Home %> > <% view home uses Content::HomeContent %> > <% template render() %> > > // HTML ... > > <% end template %> > <% end view %> > <% end skin %> > >------------------------------------------------------------------------------------------------------------ >- > > <% c++ #include "PortalContent.h" %> > <% skin Portal %> > <% view portal uses Content::PortalContent %> > <% template render() %> > > // HTML ... > > <% end template %> > <% end view %> > <% end skin %> > >------------------------------------------------------------------------------------------------------------ >- > > If I access: Home, al lis ok, but if i call Portal I receive: "There is no >such skin:" (no name in the end) > and if I remove "HomeSkin.cpp" of my project; Portal work!!! > > I am confused What is the problem? > > PS: All files is attached. > > Thanks > |
From: Renato F. <re....@ay...> - 2011-03-29 21:27:14
|
Hi, Thanks for help, now work :0) One question: I will have one skin to page. Have many skins is a problem? PS: I would like to say that I have impressed with framework, it is very powerful and elegant. Congratulations. Renato -----Mensagem original----- De: Artyom [mailto:art...@ya...] Enviada em: terça-feira, 29 de março de 2011 17:41 Para: cpp...@li... Assunto: Re: [Cppcms-users] ERROR: There is no such skin When you have more then one skin you need to either specify its name explicitly as parameter to application::render function http://art-blog.no-ip.info/cppcms_ref_v0_99/classcppcms_1_1application.html# a68b4c88d0e81a41474933043690aa1a or you need to set the configuration value views.default_skin See http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_config#views.default_ski n (I forgot to document this specific option, I have just added it to the wiki) What is important to understand that if you have different skins you need to select one somehow. Artyom ----- Original Message ---- > From: Renato Forti <re....@ay...> > To: cpp...@li... > Sent: Tue, March 29, 2011 9:31:30 PM > Subject: [Cppcms-users] ERROR: There is no such skin > > Hi All, > > What is this error: > > "There is no such skin:" > > I have 2 templates: > >----------------------------------------------------------------------- >------------------------------------ >- > > <% c++ #include "HomeContent.h" %> > <% skin Home %> > <% view home uses Content::HomeContent %> <% template render() %> > > // HTML ... > > <% end template %> > <% end view %> > <% end skin %> > >----------------------------------------------------------------------- >------------------------------------- >- > > <% c++ #include "PortalContent.h" %> > <% skin Portal %> > <% view portal uses Content::PortalContent %> <% template render() > %> > > // HTML ... > > <% end template %> > <% end view %> > <% end skin %> > >----------------------------------------------------------------------- >------------------------------------- >- > > If I access: Home, al lis ok, but if i call Portal I receive: "There >is no such skin:" (no name in the end) and if I remove "HomeSkin.cpp" >of my project; Portal work!!! > > I am confused What is the problem? > > PS: All files is attached. > > Thanks > ---------------------------------------------------------------------------- -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom <art...@ya...> - 2011-03-30 13:35:51
|
> > One question: I will have one skin to page. Have many skins is a problem? > There is no specific limit on skins number, the search of specific skin and view has log(n) complexity and should be fast. However why do you need skin per page? Create skin for something that is really "skin" i.e. separate parts of application like admin interace user interface. The basic idea is that you can use inheritance withing same skin and extend your views. > PS: I would like to say that I have impressed with framework, it is very > powerful and elegant. Congratulations. Thanks > > Renato Artyom |