Page 1 of 1

Start/ Finish of Maginot Prev/ Next Links

PostPosted: Wed Mar 05, 2008 9:52 pm
by __trainer
Coranto v1.25.1
Maginot Version: Build 17

Hi Guys,
I've just installed Maginot and it works as I'd expect (thanks :) )
I have added the 'previous' and 'next' links (see code below)

Code: Select all
<a href="<Field: PrevFileName>">Prev</a>
<a href="<Field: NextFileName>">Next</a>


However, when the previous or Next links come to the 'end' - I am directed to the maginot directory full of files like....
Code: Select all
EkpuVZAZAVdKaiUfcx.html 05-Mar-2008 21:25  5.0K 
EkpuVlFZAksCsoPgke.html 05-Mar-2008 21:25  4.2K 
EkpuVlFpAyTLXAoVSv.html 05-Mar-2008 21:25  3.6K 


Any ideas where I could be going wrong? :oops:

Thanks.

PostPosted: Fri Mar 07, 2008 5:00 pm
by __trainer
Well, I thought I found the answer here.

...but even if insert both types of tags in my template, like this...

Code: Select all
<a href="<Field: PrevFileName>">Prev</a> - + - <a href="<Field: NextFileName>">Next</a>

<p>or...</p>

<a href="<Field: PrevFileURL>">Prev</a>  + + + <a href="<Field: NextFileURL>">Next</a>


If I'm on the first or last item - I return to Apaches 'directory structure' page.

Autobuild is off.

Any thoughts? Please :)

Me too :(

PostPosted: Mon Mar 10, 2008 9:24 pm
by driv
Me too :(

Oh Parahead, Parahead - wherefore art thou Parahead :( ( ;) )

PostPosted: Fri Mar 14, 2008 10:24 pm
by __trainer
Yeah, I'm really stuck now.
Just going round and round in circles.

I *really* want to continue with Coranto, but unless I can find an answer to this - I'm going to have to look elsewhere :(


Simply put...

If I go back from the first news item I go to the apache list of files.
If I go forwards from the last news item I go to the apache list of files.

There doesn't appear to be a *first to last* connector.

Any help is much appreciated, thank you.

PostPosted: Sun Mar 16, 2008 12:15 pm
by SrNupsen
Shouldn't be too difficult. Did you try this in your style? Did you read the documentation?

Code: Select all
<If: Field: PrevFileURL>
<a href="<Field: PrevFileURL>">PREVIOUS</a>
<If: Else>
PREVIOUS
</If>


(Adaptable to suit your needs of course, perhaps you don't want to display anything at all if there is no previous page.)

PostPosted: Sun Mar 16, 2008 6:08 pm
by __trainer
Oh, I see, thank you.

I had read the documentation front to back - but I thought that section only applied to the 'split' profile.

Also I've not used the perlcode before - so that's very interesting to know about.

One other thing though... I tried that code in my style and it works.
But when it goes into the template, it doesn't work for some reaon.

The tags appear to work - but not the <If> statements

So I guess they can only be used in the styles?
Or is there a way around this?

PostPosted: Sun Mar 16, 2008 10:32 pm
by __trainer
Well - I've read a 'heck' of a lot of the replies on 'perlscript' and 'templates' and I guess there's no easy solution.

But hey, that's not so bad; it's still possible through styles, so I guess I'll re-consider my styles.

Coranto is worth sticking with - I believe!

Thank you for you help :)

PostPosted: Sun Mar 16, 2008 11:23 pm
by Musicvid
That's right, any code needs to go in <PerlCode> tags in your Style.

A Template is just an HTML "wrapper" to take output from a Style and put it on your web page. You can't put Perl there.

PostPosted: Mon Mar 17, 2008 7:38 am
by SrNupsen
__trainer wrote:Coranto is worth sticking with - I believe!


That's what we think too 8)

Do ask again if you run into anything else!