public
Rubygem
Description: A lightweight and flexible website management system.
Homepage: http://webby.rubyforge.org/
Clone URL: git://github.com/TwP/webby.git
fixing pagination bug for index pages
TwP (author)
Mon Mar 10 08:25:55 -0700 2008
commit  1fdd308a2c3862dfbe1f0593f2737058763ba6c2
tree    5d4425f1cfbb9dc6601b81f594a1ebaf03935348
parent  82e907679d14470a38501bdf71a17789669ba4eb
...
 
 
 
 
 
1
2
3
...
1
2
3
4
5
6
7
8
0
@@ -1,3 +1,8 @@
0
+== 0.8.2 / 2008-03-
0
+
0
+* 1 bug fix
0
+ - Fixed an error when paginating on an index page
0
+
0
 == 0.8.1 / 2008-03-09
0
 
0
 * 2 major enhancement
...
20
21
22
23
 
24
25
26
...
20
21
22
 
23
24
25
26
0
@@ -20,7 +20,7 @@ Logging::Appender.stdout.layout = Logging::Layouts::Pattern.new(
0
 module Webby
0
 
0
   # :stopdoc:
0
- VERSION = '0.8.1' # :nodoc:
0
+ VERSION = '0.8.2' # :nodoc:
0
   LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
0
   PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
0
   # :startdoc:
...
44
45
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
48
49
...
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
0
@@ -44,6 +44,20 @@ class Page < Resource
0
     renderer.render_page
0
   end
0
 
0
+ # call-seq
0
+ # url => string or nil
0
+ #
0
+ # Returns a string suitable for use as a URL linking to this page. Nil
0
+ # is returned for layouts.
0
+ #
0
+ def url
0
+ return @url if defined? @url and @url
0
+
0
+ @url = destination.sub(::Webby.site.output_dir, '')
0
+ @url = File.dirname(@url) if filename == 'index' and number.nil?
0
+ @url
0
+ end
0
+
0
   # call-seq:
0
   # page.number = Integer
0
   #
...
121
122
123
124
125
126
127
128
129
130
...
121
122
123
 
124
 
 
125
126
127
0
@@ -121,10 +121,7 @@ class Resource
0
   #
0
   def url
0
     return @url if defined? @url and @url
0
-
0
     @url = destination.sub(::Webby.site.output_dir, '')
0
- @url = File.dirname(@url) if filename == 'index'
0
- @url
0
   end
0
 
0
   # :stopdoc:

Comments

    No one has commented yet.