|
From: <as...@en...> - 2001-07-12 10:06:38
|
Barry, What you are trying to do with sections is one of the main reasons they exist. All you have to do is add the section name as a prefix to your template followed by underscore, ie, sectionname_header for the header. Keep in mind though that this may not be the best way to go unless your sections all look radically different. Rather, if they are variations on a theme, then stick with the one header template but populate it with elements that can vary depending on which section you're in (template-toolkit is part of Slash just for this). Good luck -- you're at the point where the tedium of installing Slash starts to pay off! Adam K Barry Caplan <bc...@i1...> wrote .. > Hi.... > > I am working to get deeper into the details of completely changing the look > and feel of a slash site. I think I still near the beginning..... > > I have made a new template, called "mainSectionIndex", which is now > included in "header" This works fine. > > I would like to have a "xSectionIndex" template for each section, which > would be included each time the section page is displayed. > > My first thought was to modify each section's slashhead.inc, but that seems > to be generated by slashd every hour. > > It looks like one way to go would be to modify the header template further, > so there was a kind of if then thing, looking roughly like this: > > if section =a then include aSectionIndex > else section =b then include bSectionIndex > .... > else include mainSectionIndex #default > > > Does that seem reasonable,or is there a better way? > > If it is reasonable, then what would the code look like? I have not found a > listing of what variables and hashes are available to the header template > (OK, I didn't look that hard because I am not sure this is the best > approach yet....), > > Just as a quick test, I tried adding in the "header" template this line: > "Section = [% section %] zzzzzz". I did not get anything in the variable > part, even though I stopped and started both slashd and apache to force the > updates. > > Also, it is not 100% clear to me how the variables end up in the template > form the source code. > > Has anyone done something similar they would like to share? > > > Thanks, > > > Barry > > > _______________________________________________ > Slashcode-general mailing list > Sla...@li... > http://lists.sourceforge.net/lists/listinfo/slashcode-general |