Re: Tutorial on Theme Building

"Asad Khan" <uoft_cstutor-/[email protected]> Fri, 21 Nov 2003 00:49:51 -0500
Newsgroups gmane.comp.cms.xaraya.documentation
Organization Xaraya News Server
Message-ID <[email protected]>
Woah that's some detailed feedback :)

Thanks, appreciate it a lot. Already fixed most of the stuff you said. Some
stuff that you suggest already appears in the paper; just not in the places
you expected it - so given that the paper is already 10 pages long, and to
avoid repitition I am leaving it out for now.

I think it would be better if you did a separate piece on dynamic frontpage.
If you think this piece is very relevant to it, maybe you can write that in
your introduction so that readers can know where else to look. I am not
familiar with *nuke so not completely sure about it. Maybe after I play
around with it for a bit, it will make more sense.

Thanks again Sam.

Asad
"Samiuela LV Taufa" <[email protected]> wrote in message
news:[email protected]
> Asad,
>
> Love the work thus far.
>
> Definiately something that would have helped me out a lot when I first
> started a month back.
>
> I've sent the response to your hotmail account and the yahoo account
> complained so am not sure you've recieved the comments. Posting it on the
> list for when you can get to it.
>
> You've written down a number of the nit-picky details that is scribbled on
> various pieces of paper around the room here, great to have them in a
single
> location.
>
> Context Comments:
>
> 4. So What is a Theme
>
> Page 2: Paragraph 2: Line 2: Classic_Xaraya ==> Xaraya_Classic
> Page 2: Paragraph 2: Line 3: would ==> will (? Likewise other use of
> past/present tense?)
> Page 2: Bullet #1: Style to style (lowercase 's')
>
> 5. Xaraya Directory Structure
>
> Great Tree
>
> Suggested addition for tree?
>
> Html -> themes -> pages -> <master templates>.xt
> Html -> themes -> blocks -> default.xt [ block-group-name.xt ] ...
>
> You give an example template for blocks, would it add to the documentation
> if you also did the same for pages (?) I think we need the default.xt in
> there anyway.
>
> e.g.
> Html -> themes -> pages -> default.xt [ <master templates>.xt ] ...
>
> Your Last Paragraph:
> "You will read at several other places, if you haven't already, that it is
> suggested to create a new template in your theme, rather than modifying a
> default one. What that means is that rather than fooling around with any
of
> the .xd templates that came with the Xaraya installation, you can simply
> override them in your own theme by creating a corresponding .xt file in
your
> theme. That way you don't lose the original .xd template."
>
> Suggested add-on:
>
> The simplest method for creating your own override template is to copy the
> existing .xd templates into your theme, and rename it to .xt.
>
> For example: to override ... Copy the template *.xd to its corresponding
> folder in your theme <theme-name>/modules/<module-name>/...xt
>
> 6. Creating your own theme
>
> Paragraph 1: Line 3: Classic_Xaraya => Xaraya_Classic
>
> 6.1
> Would it help to expand this part ?
>
> * Copy the directory Xaraya_Classic into a new directory Xaraya_Classic_2
> * Edit the file Xaraya_Classic_2/xartheme.php and concentrate on at least
> the following
>    $themeinfo['name'] = 'Xaraya_Classic';
>    $themeinfo['id'] = '###';
>    $themeinfo['directory'] = 'Xaraya_Classic';
>    - 'name' is what will display in your administration screen e.g.
> "Xaraya_Classic_2"
>    - 'directory' is the directory that the file will be in, e.g.
> "Xaraya_Classic_2"
>    - 'id' is a unique identifier for the theme on your system.
>       * pick a number not used in your other themes (if you intend to
> distribute than register your theme with Xaraya.com)
>
> Reference to http://localhost ...
>
> You could use http://www.example.com or http://www.example.net These are
> reserved domain names RFC2606 for use in documentation.
>
> 6.4 mytheme/pages
>
> Statement on admin.xt.
>
> I believe the real admin.xt is pulled whenever a module is called with
> greater than read privilege. For example, when you submit a new article,
> regardless of whether you are an administrator or not, my admin.xt is
always
> called up.
> Like you, I eventually killed the admin.xt so I don't have to maintain to
> different page files.
>
> You might just mention that it simplifies initial design to concentrate on
> one 'master' template?
>
> Page 6 - Your Text:
> -------------------
> The first interesting line is
> <!--Load the header blockgroup-->
> <xar:blockgroup name="header" id="header" />
> which appears within the head tags of the file. All this file does is
simply
> load the blockgroup named header. You can find this file (header.xt) in
> <mytheme>/blocks folder.
> --------------------
>
> I think it is more accurate(?) to say that this command(?) tells the
> BlockLayout Engine to load the blockgroup id'd as 'header' into the
current
> location and to use the template 'header.xt' if it exists in the current
> theme or 'header.xd' if it exists in the module, otherwise use default.xt
> etc.
>
> Page 7:
> ------------------
> <xar:module id="modulespace" main="true" /> This line tells the
BlockLayout
> engine to load modules in the module space.
> ------------------
> This one I'm still trying to figure out, and at the moment I'm getting the
> thinking/vibes that this means that the BL Engine will load the content of
> the 'current' module within the space.
>
> For example: when the user clicks on Articles | FrontPage then the module
is
> now Articles and it's modulespace is FrontPage which is why all the
articles
> for the frontpage now display in this space.
>
> Page 9:
> You have a reference under your user-main.xt that says:
>     html/themes/modules/base/user-main.xt
>
> Needs to have something like
>    html/themes/theme-name/modules/base/user-main.xt)
>
> I love the idea of doing this piece of documentation.
> If you would like, I can put something together for you that allows gives
an
> example of how someone can have a dynamic frontpage (similar to how
Postnuke
> allows center blocks that display only on the frontpage, when you click on
> content the center blocks disappear.)
>
> Essentially something like:
> <div id="xar-user-main">
> <xar:blockgroup name="frontPage" id="frontPage" />
> <xar:blockgroup name="frontNews" id="frontNews" /> </div>
>
> For a customer site I developed the above user-main.xt which allows the
> customer to modify their front page by changing blocks instead of hitting
on
> the template files directly.
>
> The blockgroup frontPage has 1 or more blocks largely html The blockgroup
> frontNews has 1 or more blocks largely article/topitems etc.
>
> Maybe you can make use of it.
>
> Great work and great contribution.
>
> Ciao,
>
> Sam T.
> "Asad Khan" <uoft_cstutor-/[email protected]> wrote in message
> news:[email protected]
> > You're most welcome. I will email you a zip file of all the related
stuff
> > soon.
> >
> > Regards,
> >
> > Asad
> >
> >
>
>