基本的には掲題通りの質問になります。
既存サイト(下記サイトとなります。)に、ブログの情報を掲載するためRSSを設置しました。
http://www.buffalo1992.com/
(トップページのNEWS部分)
そのRSSは、
各ジャンル別で、内容が確認できるよう
6つのタブで表示を切り替えるようにしています。
**#feed1〜#feed6という形で、「rss.js」を組んだのですが
**
feed1(全てのジャンルを表示)を最大6つまでの表示にしたいと思い以下のように打ち込みました。
js
1var rssTpl = ""; 2 rssTpl += '<a href=""><dl>'; 3 rssTpl += '<dt>{IMG}</dt>'; 4 rssTpl += '<dd><strong>{NAME}</strong><span>{DESC}</span></dd>'; 5 rssTpl += '</dl></a>'; 6 var rss =[ 7 { 8 elm: "#feed1", 9 url: "rss.php", 10 feedURL: "http://www.●●.com/fcblog/feed/", 11 max: 6, 12 titleMax: 16, 13 postMax: 40, 14 endText: "", 15 dateFormat: { 16 year: "/", 17 month: "/", 18 date: "" 19 }, 20 image: true, 21 imageSize: { 22 width: 351, 23 height: 260 24 }, 25 noImage: "yes", 26 noImageSRC: "shared/img/top/coming_soon.png", 27 template: rssTpl 28 }, 29 { 30 elm: "#feed2", 31 url: "rss.php", 32 feedURL: "http://www.●●.com/fcblog/category/news/feed/", 33 max: 3, 34 titleMax: 16, 35 postMax: 40, 36 endText: "", 37 dateFormat: { 38 year: "/", 39 month: "/", 40 date: "" 41 }, 42 image: true, 43 imageSize: { 44 width: 351, 45 height: 260 46 }, 47 noImage: "yes", 48 noImageSRC: "shared/img/top/coming_soon.png", 49 template: rssTpl 50 }, 51 { 52 elm: "#feed3", 53 url: "rss.php", 54 feedURL: "http://www.●●.com/fcblog/category/meat/feed/", 55 max: 3, 56 titleMax: 16, 57 postMax: 40, 58 endText: "", 59 dateFormat: { 60 year: "/", 61 month: "/", 62 date: "" 63 }, 64 image: true, 65 imageSize: { 66 width: 351, 67 height: 260 68 }, 69 noImage: "yes", 70 noImageSRC: "shared/img/top/coming_soon.png", 71 template: rssTpl 72 }, 73 { 74 elm: "#feed4", 75 url: "rss.php", 76 feedURL: "http://www.●●.com/fcblog/category/media/feed/", 77 max: 3, 78 titleMax: 16, 79 postMax: 40, 80 endText: "", 81 dateFormat: { 82 year: "/", 83 month: "/", 84 date: "" 85 }, 86 image: true, 87 imageSize: { 88 width: 351, 89 height: 260 90 }, 91 noImage: "yes", 92 noImageSRC: "shared/img/top/coming_soon.png", 93 template: rssTpl 94 }, 95 { 96 elm: "#feed5", 97 url: "rss.php", 98 feedURL: "http://www.●●.com/fcblog/category/report/feed/", 99 max: 3, 100 titleMax: 16, 101 postMax: 40, 102 endText: "", 103 dateFormat: { 104 year: "/", 105 month: "/", 106 date: "" 107 }, 108 image: true, 109 imageSize: { 110 width: 351, 111 height: 260 112 }, 113 noImage: "yes", 114 noImageSRC: "shared/img/top/coming_soon.png", 115 template: rssTpl 116 }, 117 { 118 elm: "#feed6", 119 url: "rss.php", 120 feedURL: "http://www.●●.com/fcblog/category/party/feed/", 121 max: 3, 122 titleMax: 16, 123 postMax: 40, 124 endText: "", 125 dateFormat: { 126 year: "/", 127 month: "/", 128 date: "" 129 }, 130 image: true, 131 imageSize: { 132 width: 351, 133 height: 260 134 }, 135 noImage: "yes", 136 noImageSRC: "shared/img/top/coming_soon.png", 137 template: rssTpl 138 }]
上記のように、入力したところ
feed1に関しては、何故か14件ほど表示されてしまいます。
どなたか、改善策ご存じの方いらっしゃいましたら
ご教授いただけますと幸いです。
回答1件
あなたの回答
tips
プレビュー