Mar 3, 2012 at 2:29 PM
Edited Mar 3, 2012 at 2:33 PM
Can I have the HTML widget insert custom text/read from a custom txt file when creating a site from a custom recipe?
The issue is that recipes are just plain xml files, which can be used by the import/export module, so having a file text here would not make sense in general. But you might open a bug for that.
There was a point where I wanted the exact same thing but the command line is very limited. Instead, you can add any content for *any* type as part of the data part of the recipe. Here is an example item I have:
<View Id="/Route.Slug=services" Status="Published"> <CommonPart Owner="/User.UserName=admin" CreatedUtc="2011-12-31T19:28:00Z" PublishedUtc="2011-12-31T19:28:00Z" ModifiedUtc="2011-12-31T19:28:00Z" />
<RoutePart Title="Services" Slug="services" Path="services" /> <MetaPart Keywords="Services, Another Key Word, yet another" Description="This is services page." /> </View>
To figure out the proper structure, you can simply use the import/export functionality if you want to create the content in your test site then import it into your site as part of the recipe or later as part of a separate file.
Your point is valid though. I'd love to figure out the proper way to extend the import/export capability as part of a recipe to allow my recipe to reference other XML files. For larger sites, I have multiple people and some source code repos
do not exactly treat XML files as first class citizens so having each section of the site in a separate data xml file would help.