[prev in list] [next in list] [prev in thread] [next in thread]
List: slashcode-general
Subject: Re: [Slashcode-general] Adding (mostly) static pages to slash
From: "James Carscadden" <james () ns ! carscadden ! org>
Date: 2003-11-13 15:19:32
[Download RAW message or body]
Alright, that seemed to work (sort of). Here is what worked for me:
sub main {
my $slashdb = getCurrentDB();
my $form = getCurrentForm();
my $section = $slashdb->getSection($form->{section});
header(getData('head'), $section->{section});
slashDisplay('screenshots', {
title => 'About Me',
width => '90%',
}, {
Page => 'personal',
Section => 'default',
});
footer($form->{ssi});
}
createEnvironment();
main();
1;
Note that page and section (note the upper/lower casing as well), must go
in the 3rd parameter to slashDisplay. That was my problem, originally I
had them in the second parameter.
Works now, thanks all
James
>
> On Nov 13, 2003, at 8:41 AM, James Carscadden wrote:
>>>>
>>>> So all very well and good, but I can't seem to get that template
>>>> loaded.
>>>> No matter what I try the index.pl will always try to load
>>>> screenshots:misc:default instead of the one I want. I've read about
>>>> the
>>>> page option for slashDisplay, but I can't seem to make it work.
>>>
>>> slashDisplay will first try to pull up the template
>>> screenshots;index;default, if it can't find it then it'll try
>>> screenshots;misc;default
>>>
>>> remember, templates are name;page;section.
>>>
>>> in this case your page is index because index.pl is what's pulling it.
>>>
>>>
>>
>> I had realised this, however, what I actually wanted was for the
>> template
>> to be screenshots:personal:default - that is I want to force the
>> template
>> to be page=personal regardless of the fact that I'm loading index.pl.
>>
>> It seems from the docs that slashDisplay has a page option that I can
>> use
>> to force this, I just can't get it to work. Can anyone shed
>> enlightenment
>> (or an example) on this?
>>
> I think the syntax is something like
>
> slashDisplay('screenshots',{data}, { page => 'personal'});
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Slashcode-general mailing list
Slashcode-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/slashcode-general
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic