How to use [shownext] to create "Next | Previous" search results the same way Google does...
numero = 304--- begin CSS ---/* paging */.Pages {text-align: center;clear: both;}.Paginator {font-size: 12px;padding-top: 10px;margin-left: auto;margin-right: auto;}.Paginator a, .pageList .this-page {padding: 2px 6px;border: solid 1px #ddd;background: #fff;text-decoration: none;}.Paginator .AtStart {margin-right: 20px;padding: 2px 6px;color: #334f73;}.Paginator .Prev {margin-right: 20px;padding: 2px 6px;border: solid 2px #ddd;background: #fff;}.Paginator .Next {margin-left: 20px;padding: 2px 6px;border: solid 2px #ddd;background: #fff;}.Paginator .AtEnd {margin-left: 20px;padding: 2px 6px;color: #334f73;}.Paginator .this-page {padding: 2px 6px;border-color: #999;font-weight: bold;font-size: 13px;color: #334f73;}.Paginator .onthis{color: #fff;background: #739dd3;border-color: #334f73;text-decoration: none;}.Paginator a:hover {color: #fff;background: #739dd3;border-color: #334f73;text-decoration: none;}.Pages div.Results {text-align: center;font: 11px/15px Arial, Helvetica;color: #aaa;margin-top: 8px;}--- end CSS ------ begin code on page ---[if[page]![raw][page][/raw]][then][text]page=[page][/text][/then][else][text]page=1[/text][/else][/if][search db=your.db&your search/sortterms&max=10&startat=[math](([page]-1)*10)+1[/math]]Page [page] of [math]ceil([numFound]/10)[/math][genPagingpath=[url][thisurl]?[/url]n=[numfound]&page=[page]&end=[math]ceil([numfound]/10)[/math]][foundItems]Etc...[genPagingpath=[url][thisurl]?[/url]n=[numfound]&page=[page]&end=[math]ceil([numfound]/10)[/math]][/foundItems][/search]You can also end the found items like this to get the paging on the bottom--- end code on page ------ put this function somewhere on your page or your functions lib ---[function name=genPaging]<div class="Pages"><div class="Paginator">[if [end]<18][then][loop start=1&end=[end]][if [page]=[index]][then]<spanclass="this-page">[index]</span>[/then][else]<ahref="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/else][/if][/loop][/then][else][if [math][page]-8[/math]<0][then][loop start=1&end=10][if [page]=[index]][then]<spanclass="this-page">[index]</span>[/then][else]<ahref="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/else][/if][/loop]...[loop start=[math][end]-2[/math]&end=[end]]<ahref="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/loop][/then][else][if [math][page]+7[/math]>[end]][then][loopstart=1&end=3]<ahref="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/loop]...[loopstart=[math][end]-9[/math]&end=[end]][if [page]=[index]][then]<spanclass="this-page">[index]</span>[/then][else]<ahref="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/else][/if][/loop][/then][else][loop start=1&end=3]<ahref="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/loop]...[loopstart=[math][page]-3[/math]&end=[math][page]+3[/math]][if[page]=[index]][then]<span class="this-page">[index]</span>[/then][else]<ahref="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/else][/if][/loop]...[loop start=[math][end]-2[/math]&end=[end]]<ahref="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/loop][/else][/if][/else][/if][/else][/if]</div></div>[/function]--- end functionThis example is active at http://www.kanuhawaii.org/today/journals/
--- begin CSS ---Olin Lagon
/* paging */
.Pages {
text-align: center;
clear: both;
}
.Paginator {
font-size: 12px;
padding-top: 10px;
margin-left: auto;
margin-right: auto;
}
.Paginator a, .pageList .this-page {
padding: 2px 6px;
border: solid 1px #ddd;
background: #fff;
text-decoration: none;
}
.Paginator .AtStart {
margin-right: 20px;
padding: 2px 6px;
color: #334f73;
}
.Paginator .Prev {
margin-right: 20px;
padding: 2px 6px;
border: solid 2px #ddd;
background: #fff;
}
.Paginator .Next {
margin-left: 20px;
padding: 2px 6px;
border: solid 2px #ddd;
background: #fff;
}
.Paginator .AtEnd {
margin-left: 20px;
padding: 2px 6px;
color: #334f73;
}
.Paginator .this-page {
padding: 2px 6px;
border-color: #999;
font-weight: bold;
font-size: 13px;
color: #334f73;
}
.Paginator .onthis{
color: #fff;
background: #739dd3;
border-color: #334f73;
text-decoration: none;
}
.Paginator a:hover {
color: #fff;
background: #739dd3;
border-color: #334f73;
text-decoration: none;
}
.Pages div.Results {
text-align: center;
font: 11px/15px Arial, Helvetica;
color: #aaa;
margin-top: 8px;
}
--- end CSS ---
--- begin code on page ---
[if
[page]![raw][page][/raw]][then][text]page=[page][/text][/then][else][text]pa
ge=1[/text][/else][/if]
[search db=your.db&your search/sort
terms&max=10&startat=[math](([page]-1)*10)+1[/math]]
Page [page] of [math]ceil([numFound]/10)[/math]
[genPaging
path=[url][thisurl]?[/url]n=[numfound]&page=[page]&end=[math]ceil([numfound]
/10)[/math]]
[founditems]
Etc...
[genPaging
path=[url][thisurl]?[/url]n=[numfound]&page=[page]&end=[math]ceil([numfound]
/10)[/math]]
[/foundItems][/search]
You can also end the found items like this to get the paging on the bottom
--- end code on page ---
--- put this function somewhere on your page or your functions lib ---
[function name=genPaging]
<div class="Pages"><div class="Paginator">
[if [end]<18]
[then]
[loop start=1&end=[end]][if [page]=[index]][then]<span
class="this-page">[index]</span>[/then][else]<a
href="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/else][/if][/loop]
[/then]
[else]
[if [math][page]-8[/math]<0]
[then]
[loop start=1&end=10][if [page]=[index]][then]<span
class="this-page">[index]</span>[/then][else]<a
href="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/else][/if][/loop]...[
loop start=[math][end]-2[/math]&end=[end]]<a
href="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/loop]
[/then]
[else]
[if [math][page]+7[/math]>[end]][then][loop
start=1&end=3]<a
href="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/loop]...[loop
start=[math][end]-9[/math]&end=[end]][if [page]=[index]][then]<span
class="this-page">[index]</span>[/then][else]<a
href="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/else][/if][/loop][/th
en][else][loop start=1&end=3]<a
href="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/loop]...[loop
start=[math][page]-3[/math]&end=[math][page]+3[/math]][if
[page]=[index]][then]<span class="this-page">[index]</span>[/then][else]<a
href="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/else][/if][/loop]...[
loop start=[math][end]-2[/math]&end=[end]]<a
href="[path]page=[index]&n=[n]&end=[end]">[index]</a>[/loop][/else][/if]
[/else]
[/if]
[/else]
[/if]
</div></div>
[/function]--- end function
DOWNLOAD WEBDNA NOW!
This Technical Change History provides a reverse chronological list of WebDNA changes...
AWS Raw WebDNA LAMP-Plus WebServerAmazon Web Services (AWS) README for Machine Image ID...
WebDNA reference...
WebDNA ModulesA list of the currently available modules...
WebDNA LibrariesA list of available libraries for WebDNA...
Download WebDNA ApplicationsWebDNA applications...
This will show your next links in the format of Page 1 | 2 | 3 etc and can be used even when the page isn't a results page from a [search] command...
another [shownext] exampleHow to use [shownext] to create "Next | Previous" search results the same way Google does...
a [shownext] exampleHow to use [shownext] to create "Next | Previous" search results the same way Google does...
How do I get the content of a returned page?...
How do I make tcpconnect send a username and password like the browser does?so I can access a page that normally needs to be logged into via the browser's authentication dialog? In other words...
an example of application for [shownext]How to use [shownext] to create "Next | Previous" search results the same way Google does...