Commits

Shlomi Fish committed 399a4de

Add the online_url tag.

  • Participants
  • Parent commits 6cccba1

Comments (0)

Files changed (3)

 </define-tag>
 
 <define-tag book_info>
-<preserve authors />
-<preserve publisher />
-<preserve isbn />
-<preserve perlbooksid />
-<preserve perlbookslink />
+
+<preserve authors publisher isbn perlbooksid perlbookslink online_url />
+
 <set-var %attributes />
 <set-var ext_publisher=<get_ext_publisher <get-var publisher /> /> />
-<set-var perlbookslink="<a href="http://books.perl.org/book/<get-var perlbooksid />"><b>Book Page at books.perl.org</b></a><br />" />
+<set-var perlbookslink="<a href="http://books.perl.org/book/<get-var perlbooksid />">Book Page at books.perl.org</a><br />" />
 <div class="bookinfo">
 <h3>Book Information</h3>
+
 <b>Authors:</b> <get-var authors /><br />
 <b>Publisher:</b> <get-var ext_publisher /><br />
 
+<if "<get-var online_url />" "<a href="<get-var online_url />"><b>Download/View Online</b></a><br />" "" />
 <if "<get-var perlbooksid />" "<get-var perlbookslink />" "" />
+
 <b>Buy From:</b> 
 <book_store isbn="<get-var isbn />" store="amazon" title="Amazon" /> - 
 <book_store isbn="<get-var isbn />" store="powells" title="Powells" /> - 
 <book_store isbn="<get-var isbn />" store="amazonuk" title="Amazon UK" />
 <br />
 </div>
-<restore perlbookslink />
-<restore perbooksid />
-<restore isbn />
-<restore publisher />
-<restore authors />
+
+<restore authors publisher isbn perlbooksid perlbookslink online />
+
 </define-tag>
 

src/books/advanced/index.html.wml

     publisher="apress"
     isbn="159059018X"
     perlbooksid="166"
+    online_url="http://www.apress.com/free/"
     />
 
 <p>
     publisher="morgan_kaufmann"
     isbn="1558607013"
     perlbooksid="230"
+    online_url="http://hop.perl.plover.com/"
     />
 
 <p>

src/books/index.html.wml

     authors="chromatic"
     publisher="onyx"
     isbn="0977920151"
+    online_url="<modern_perl_book_url />"
     />
 
 <define-tag beginning_perl_url whitespace="delete">
     publisher="apress"
     isbn="159059391X"
     perlbooksid="100"
+    online_url="<beginning_perl_url />"
     />
 
 <p>