Changes between Version 7 and Version 8 of EggCookingTutorial/AdvancedEggCooking
- Timestamp:
- Dec 30, 2005, 7:26:49 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
EggCookingTutorial/AdvancedEggCooking
v7 v8 7 7 == Adding template == 8 8 9 To have a template we need directory and of course template itself. We will keep same simple "Hello world!" text in visible, but this time we will integrate our fine words inTrac layout.9 To have a template we need a directory and of course the template itself. We will keep the same simple "Hello world!" text, but this time we will integrate our fine words into a Trac layout. 10 10 11 11 For that we need to create one additional directory: … … 14 14 }}} 15 15 16 In that directory create new file ''helloworld.cs'':16 In that directory create a new file ''helloworld.cs'': 17 17 {{{ 18 18 #!text/html … … 27 27 }}} 28 28 29 Now you have created t emplate forplugin.29 Now you have created the template for the plugin. 30 30 31 31 == Tell Trac where template is == 32 32 33 Trac doesn't know where your template is so you have to tell it. This is done by adding ITemplateProvider methodin ''helloworld.py''.33 Trac doesn't know where your template is so you have to tell it. This is done by implementing the ITemplateProvider interface in ''helloworld.py''. 34 34 35 35 So you change few lines as following: … … 116 116 == Copy template to egg == 117 117 118 Finally you have to include new template directory in egg.118 Finally you have to include the new template directory in an egg. 119 119 120 120 So change ''setup.py'' to be like: … … 132 132 == Building and deploying == 133 133 134 Building and deployment goes exactly same way as it was inprevious tutorial [wiki:EggCookingTutorial/BasicEggCooking#Firstdeployment EggCookingTutorial/BasicEggCooking].134 Building and deployment goes exactly the same as it did in the previous tutorial [wiki:EggCookingTutorial/BasicEggCooking#Firstdeployment EggCookingTutorial/BasicEggCooking]. 135 135 136 Now you should see big "Hello world!" text integrated in Trac layout when you press that fancy button inmain navigation bar.136 Now you should see a big "Hello world!" integrated into your Trac layout when you press that fancy button in the main navigation bar. 137 137 138 138 == Aftermath == 139 139 140 Now you have added basic template for your plugin let's add final twist, put some static content like own stylesheet and oneimage. Continue to [wiki:EggCookingTutorial/AdvancedEggCooking2 EggCookingTutorial/AdvancedEggCooking2]140 Now that you have added a basic template for your plugin let's add the final twist, putting some static content like a stylesheet and an image. Continue to [wiki:EggCookingTutorial/AdvancedEggCooking2 EggCookingTutorial/AdvancedEggCooking2] 141 141 142 142