Pages: [1]
  Print  
Author Topic: Templating  (Read 170 times)
Steve Jenkins
Gaia User
**
Posts: 17


« on: July 31, 2011, 09:58:41 AM »

Hi;
I think I've got my first page working on this platform, yay! But I've got one BIG question:
What about templating? Do I have to copy mountains of code into _every_ daggone page and assets from my site.xml file into every <page ...></page>?

Also, what's a quick way to test that my nav widgets are working? What can I trace in my onClick fn in the nav page?
TIA,
Steve
Logged
Ramiro
Moderator
Gaia Addict
*****
Posts: 861


interactive pragmatism


« Reply #1 on: July 31, 2011, 03:31:01 PM »

not sure what you mean about templates. If it means having some base code and/or assets/fonts/folder inside every fla page, you have a templates folder inside your project folder, just modify the Page.as file for the class template and the fla file for the fla template. There're two (cant remember the names right now), one for timeline template and another for as template.

I cant understand your second question Smiley
Logged
Steve Jenkins
Gaia User
**
Posts: 17


« Reply #2 on: August 01, 2011, 08:21:14 AM »

The templates/Pages.as looks like it will be a good start, however I was hoping for something more robust,  something along the lines of MVC (model-view-controller). Looks like a fellow named Glidias built something he called gaiaModXCMSFramework but it appears this project was dropped some two years ago and wasn't developed enough to get out of alpha.
Thanks,
Steve
Logged
Steve Jenkins
Gaia User
**
Posts: 17


« Reply #3 on: August 01, 2011, 08:26:26 AM »

Oops. Not seeing in the templates/Pages.as or anywhere else how to add something like the following:

         <page id="home" title="Home" src="home.swf" menu="true" seo="true">
            <asset id="img1" src="assets/img1.png" depth="nested" />
            <asset id="img2" src="assets/img2.png" depth="nested" />
            <asset id="img3" src="assets/img3.png" depth="nested" />
            <asset id="img4" src="assets/img4.png" depth="nested" />
            <asset id="img5" src="assets/img5.png" depth="nested" />
            <asset id="img6" src="assets/img6.png" depth="nested" />
            <asset id="main0" src="assets/main0.png" depth="nested" />
            <asset id="main1" src="assets/main1.png" depth="nested" />
            <asset id="main2" src="assets/main2.png" depth="nested" />
            <asset id="main3" src="assets/main3.png" depth="nested" />
            <asset id="main4" src="assets/main4.png" depth="nested" />
            <asset id="main5" src="assets/main5.png" depth="nested" />
            <asset id="Maya2012_logo" src="assets/Maya2012_logo.png" depth="nested" />
            <asset id="pp_logo" src="assets/pp_logo.png" depth="nested" />
            <asset id="register" src="assets/register.png" depth="nested" />
            <asset id="sign_me_up_small" src="assets/sign_me_up_small.png" depth="nested" />
            <asset id="sign_me_up" src="assets/sign_me_up.png" depth="nested" />
            <asset id="signup" src="assets/signup.png" depth="nested" />
            <asset id="tai_chi" src="assets/tai_chi.png" depth="nested" />
            <asset id="Teri_Dalai_Tobylt" src="assets/Teri_Dalai_Tobylt.jpg" depth="nested" />
            <asset id="ball2" src="assets/starburst/ball2.png" depth="nested" />
            <asset id="circle1" src="assets/starburst/circle1.png" depth="nested" />
            <asset id="star1" src="assets/starburst/star1.png" depth="nested" />
            <asset id="star2" src="assets/starburst/star2.png" depth="nested" />
         </page>

from the site.xml file once for all pages, instead of having to add it to every single page.
TIA,
Steve
Logged
Ramiro
Moderator
Gaia Addict
*****
Posts: 861


interactive pragmatism


« Reply #4 on: August 01, 2011, 08:51:23 AM »

you cant. an easy find and replace with regexp will do the trick
Logged
Steve Jenkins
Gaia User
**
Posts: 17


« Reply #5 on: August 01, 2011, 09:46:42 AM »

k. Thanks Wink
Steve
Logged
Pages: [1]
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc