LoginSignup
0
1

More than 5 years have passed since last update.

【★RSS設置について】表示件数を変更したい。

Posted at

基本的には掲題通りの質問になります。

既存サイトに、ブログの情報を掲載するためRSSを設置しました。

そのRSSは、
各ジャンル別で、内容が確認できるよう
6つのタブで表示を切り替えるようにしています。

*#feed1〜#feed6という形で、「rss.js」を組んだのですが
*

feed1(全てのジャンルを表示)を最大6つまでの表示にしたいと思い以下のように打ち込みました。


var rssTpl = "";
rssTpl += '

';
rssTpl += '
{IMG}
';
rssTpl += '
{NAME}{DESC}
';
rssTpl += '
';
var rss =[
{
elm: "#feed1",
url: "rss.php",
feedURL: "http://www.●●.com/fcblog/feed/",
max: 6,
titleMax: 16,
postMax: 40,
endText: "",
dateFormat: {
year: "/",
month: "/",
date: ""
},
image: true,
imageSize: {
width: 351,
height: 260
},
noImage: "yes",
noImageSRC: "shared/img/top/coming_soon.png",
template: rssTpl
},
{
elm: "#feed2",
url: "rss.php",
feedURL: "http://www.●●.com/fcblog/category/news/feed/",
max: 3,
titleMax: 16,
postMax: 40,
endText: "",
dateFormat: {
year: "/",
month: "/",
date: ""
},
image: true,
imageSize: {
width: 351,
height: 260
},
noImage: "yes",
noImageSRC: "shared/img/top/coming_soon.png",
template: rssTpl
},
{
elm: "#feed3",
url: "rss.php",
feedURL: "http://www.●●.com/fcblog/category/meat/feed/",
max: 3,
titleMax: 16,
postMax: 40,
endText: "",
dateFormat: {
year: "/",
month: "/",
date: ""
},
image: true,
imageSize: {
width: 351,
height: 260
},
noImage: "yes",
noImageSRC: "shared/img/top/coming_soon.png",
template: rssTpl
},
{
elm: "#feed4",
url: "rss.php",
feedURL: "http://www.●●.com/fcblog/category/media/feed/",
max: 3,
titleMax: 16,
postMax: 40,
endText: "",
dateFormat: {
year: "/",
month: "/",
date: ""
},
image: true,
imageSize: {
width: 351,
height: 260
},
noImage: "yes",
noImageSRC: "shared/img/top/coming_soon.png",
template: rssTpl
},
{
elm: "#feed5",
url: "rss.php",
feedURL: "http://www.●●.com/fcblog/category/report/feed/",
max: 3,
titleMax: 16,
postMax: 40,
endText: "",
dateFormat: {
year: "/",
month: "/",
date: ""
},
image: true,
imageSize: {
width: 351,
height: 260
},
noImage: "yes",
noImageSRC: "shared/img/top/coming_soon.png",
template: rssTpl
},
{
elm: "#feed6",
url: "rss.php",
feedURL: "http://www.●●.com/fcblog/category/party/feed/",
max: 3,
titleMax: 16,
postMax: 40,
endText: "",
dateFormat: {
year: "/",
month: "/",
date: ""
},
image: true,
imageSize: {
width: 351,
height: 260
},
noImage: "yes",
noImageSRC: "shared/img/top/coming_soon.png",
template: rssTpl
}]


上記のように、入力したところ
feed1に関しては、何故か14件ほど表示されてしまいます。

どなたか、改善策ご存じの方いらっしゃいましたら
ご教授いただけますと幸いです。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1