|
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 |
|
From: <as...@en...> - 2001-07-12 13:28:52
|
> Uhmm, I remeber that you change the section template in the template > name, as I put in other answer. >=20 > For example, to have a index tempate for the debian section: >=20 > index;index;debian ... =BFisn't this correct? Oops I got my Slash1 and Slash2 mixed up. The underscore method is Slash1= . In Slash2, Alvaro's semicolons are correct. Adam |
|
From: Alvaro d. C. <ac...@ba...> - 2001-07-12 13:43:51
|
El 12 Jul 2001 03:26:45 -0500, as...@en... escribió: > > Uhmm, I remeber that you change the section template in the template > > name, as I put in other answer. > > > > For example, to have a index tempate for the debian section: > > > > index;index;debian ... isn't this correct? > > Oops I got my Slash1 and Slash2 mixed up. The underscore method is Slash1. In Slash2, Alvaro's semicolons are correct. guau, ¿this works in Slash1? I don't know. It's a pity doesn't play with it :-( Cheers -- Alvaro > |
|
From: <al...@ya...> - 2001-07-12 14:55:52
|
--- as...@en... wrote: > > Uhmm, I remeber that you change the section template in the template > > name, as I put in other answer. > > > > For example, to have a index tempate for the debian section: > > > > index;index;debian ... ¿isn't this correct? > > Oops I got my Slash1 and Slash2 mixed up. The underscore method is Slash1. In Slash2, Alvaro's > semicolons are correct. > > Adam At the risk of sounding like a newbie - is this sort of thing in some documentation somewhere? Alex ===== Alex McLintock al...@OW... Open Source Consultancy in London OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ DR WHO COMPETITION: http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104 Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/ ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie |
|
From: Alvaro d. C. <ac...@ba...> - 2001-07-13 10:15:04
|
El 12 Jul 2001 15:55:51 +0100, Alex McLintock escribió: > --- as...@en... wrote: > > > Uhmm, I remeber that you change the section template in the template > > > name, as I put in other answer. > > > > > > For example, to have a index tempate for the debian section: > > > > > > index;index;debian ... ¿isn't this correct? > > > > Oops I got my Slash1 and Slash2 mixed up. The underscore method is Slash1. In Slash2, Alvaro's > > semicolons are correct. > > > > Adam > > At the risk of sounding like a newbie - is this sort of thing in some documentation > somewhere? I think that no at the moment. Maybe you can collect this thread and make a perldoc or html or txt. Maybe I can do it. Then we can give it to slashcode core to integrate it in the faq or in some other section. Cheers -- Alvaro > > Alex > > > ===== > Alex McLintock al...@OW... Open Source Consultancy in London > OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ > DR WHO COMPETITION: http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104 > Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/ > > ____________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk > or your free @yahoo.ie address at http://mail.yahoo.ie > > _______________________________________________ > Slashcode-general mailing list > Sla...@li... > http://lists.sourceforge.net/lists/listinfo/slashcode-general > |
|
From: barry <sla...@i1...> - 2001-09-28 20:43:01
|
At 10:38 AM 7/12/2001 -0800, [long ago!] Nathan Vonnahme wrote: >For *blocks*, the old method still applies in slash 2-- so if you want an >"older stuff" block in your debian section, you have to make a block named >debian_more (that's why by default there are blocks like features_more and >articles_more). Also, if you have a block named "debian" it will show up >on all the pages in the debian section (index and articles). OK, I am getting back to this point now after letting it ride - now it has risen to the top of the to -o list.... I have a section called "Support." The only template associated with that is called "SectionIndex;misc;Support". I modified the "index;index;default" template to call the "SectionIndex" where I think the original called mainIndex or something like that. This all works well and good. But what I notice is that the main site page has all the right hand side blocks and the Support section does not. I tried Nathan's advice above and from the admin/blocks interface created 2 blocks (both static) in the "Support" section: 1 - Support_more 2- freshmeat_more I added some random content to the Support_more block. I am guessing for now (correct me if am wrong) that the freshmeat_more would have content filled automatically via portald. I set the number of stories to display on the Support section to 1, since I am just configuring this site and there is not much content. I submitted 3-4 stories to the Support section successfully. The goal is to get the 2 boxes to appear on the right, but none of this seems to have made any difference. I can't find any additional documentation in the FAQ at all. So far someone has quickly stepped up with the answer for my questions - I hope this time is no different! Thanks! Barry |
|
From: Alvaro d. C. <ac...@ba...> - 2001-07-12 11:39:33
|
El 12 Jul 2001 00:04:30 -0500, as...@en... escribió: > 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. Uhmm, I remeber that you change the section template in the template name, as I put in other answer. For example, to have a index tempate for the debian section: index;index;debian ... ¿isn't this correct? Cheers -- Alvaro > > 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... |