How to recall Id instead of Itemid
Posted: Thu Nov 29, 2007 4:40 am
Hi Guys,
I am a beginner of PHP coding. I have a question regarding a recall of something.
Here is the code:
I'll try to explain what I am trying to do.
There is a really good component called RD RSS. You can create individual RSS feeds for specific categories. Everything is fine about component. But there is no module which can display these specific RSS Feeds in specific categories. Let's say I have "X" RSS Feed for Category X. But I cannot show this Feed in the content page of this category.
Then I figured something. And I used a PHP module which can insert any Custom PHP code to run this code in the content page. You see the code that I figured for PHP module.
Here is the problem starting:
RD RSS Shows these feeds like this:
index.php?option=com_rd_rss&id=3
But my PHP code finds the category and insert the specific feed in joomla's category Item id. Now conflicts start.
My code give me something like this:
http://www.mywebsite.com/index.php?opti ... id=$Itemid but RD RSS say the feed URL should be like this: http://www.mywebsite.com/index.php?opti ... d_rss&id=3
I have to tell my Code that it should convert Itemid into id where it finds it.
Can you tell me how I can do that?
Thanks very much
I am a beginner of PHP coding. I have a question regarding a recall of something.
Here is the code:
Code: Select all
<?php
global $Itemid;
$link = '
<a href="'.sefRelToAbs("index.php?option=com_rd_rss&Itemid=$Itemid").'"> <img alt="Subscribe RSS in this category" src="templates/gb/images/rss.gif" border="0"/></a>
';
echo $link;
?>
There is a really good component called RD RSS. You can create individual RSS feeds for specific categories. Everything is fine about component. But there is no module which can display these specific RSS Feeds in specific categories. Let's say I have "X" RSS Feed for Category X. But I cannot show this Feed in the content page of this category.
Then I figured something. And I used a PHP module which can insert any Custom PHP code to run this code in the content page. You see the code that I figured for PHP module.
Here is the problem starting:
RD RSS Shows these feeds like this:
index.php?option=com_rd_rss&id=3
But my PHP code finds the category and insert the specific feed in joomla's category Item id. Now conflicts start.
My code give me something like this:
http://www.mywebsite.com/index.php?opti ... id=$Itemid but RD RSS say the feed URL should be like this: http://www.mywebsite.com/index.php?opti ... d_rss&id=3
I have to tell my Code that it should convert Itemid into id where it finds it.
Can you tell me how I can do that?
Thanks very much