Assign itemID for each article

Locked
Markyboy
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 12, 2008 11:21 am

Assign itemID for each article

Post by Markyboy » Tue Jan 06, 2009 9:23 pm

Hi,

I am looking for a way for some cases to assign an item ID to certain articles. I do not know if this is already possible in joomla?

I know you can work with an external link and add the item ID but this is not what i want.

Sometimes with a search you will get articles that will be displayed without any module positions whatsoever. I try to avoid that and that's why it is very useful that one can assign an itemID to each article to be assured that the article will be displayed with modules that you want to display belonging to that article.

I hope my description is clear for what i will find very useful.

Thanx,

Markyboy

Markyboy
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 12, 2008 11:21 am

Not very interesting Re: Assign itemID for each article

Post by Markyboy » Thu Jan 15, 2009 6:53 pm

Unfortunately it seems that this is not very interesting for posting in this area. I guess most joomla users will not use joomla to the max as i do.. When building large sites this feature would be a very handy one as you are assured that an article is always displayed with certain modules you want to display along with an article. When performing a search now in joomla and you read the article you will see the article only without any modules positions.... In most cases thats a waste as you might want to show a lot of stuff related to that article that you might want to show.... just having the option &Itemid= when adding an article would do miracles for me...

Maybe a simple plugin would be the sollution.. like you ad in an article the following
{linkitemID=404}

Hope that there are more people who see something in this feature. It certainly would help me....

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30814
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Assign itemID for each article

Post by Per Yngve Berg » Thu Jan 15, 2009 7:43 pm

Articles have an ID which is the primary key in the jos_content table.

I do not just understand what you are askin for!

Markyboy
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 12, 2008 11:21 am

Re: Assign itemID for each article

Post by Markyboy » Thu Jan 15, 2009 8:26 pm

Hi,

Thanx for responding.. Yes it is a little tricky to explain what i mean. Basically it is not that difficult (i guess) but this became an issue because i have not found any answer yet for what i try to achieve.

Basically when i add an article it will be part of com_content. Let's give an example.
I have created a test article with the following link;
http://travel2.gr/index.php?option=com_ ... d=40:crete

As you can see there is an article id and an category ID when you open the article. This way you will not see any modules in this part of the site.

Because i will go to work with loads of islands and towns etc which i all want to have individual module positions as i want to show different things for each island or town it crossed my mind that basically i want to display an article with a particular layout.

Lets say the test article is related to the island crete which has Itemid=367. When i open the article i always want to display the modules that belong to the island of crete.

Click on the link below to see the difference. You will see only one module, but i guess you get the idear.
http://travel2.gr/index.php?option=com_ ... Itemid=367


Now what i want is simple... :eek:

I want to have the option when adding a new article to provide in admin an Itemid for the article in case i would want to .... so i am assured that i will see the modules that i want to display with the article. Even when performing a search and you click on the article link. (now you will see the article only)

This option i would only give to the administrators or special users in the admin of joomla by the way .. But that's how i would prefer it. otherwise users could assign articles to sections that you might not want as a webmaster.

I hope it made a little more clear what I am looking for...

Marc

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30814
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Assign itemID for each article

Post by Per Yngve Berg » Fri Jan 16, 2009 12:53 pm

Use the Joomla split menu. This thread might help you out.

http://forum.joomla.org/viewtopic.php?f=431&t=358760

Markyboy
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 12, 2008 11:21 am

Re: Assign itemID for each article

Post by Markyboy » Fri Jan 16, 2009 2:19 pm

Hi,

Unfortunately you are still missing the point. I do not need to have extra control over menu etc. The only thing that i want is to hook up an article to an Itemid.

The way to achieve this would be to add an extra field in administrator >> articles for new articles or editing articles.

The extra field can be added under parameters.
Call the field for example:

link Itemid

1. When leaving blank the structure stay as is.
2. When entered an Itemid the article will be displayed on the site with module positions belonging to the Itemid.

Just adding &Itemid="entered-number" in the url will do the trick.

Unfortunately i cannot make it more clear than this. :-[

Marc

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30814
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Assign itemID for each article

Post by Per Yngve Berg » Fri Jan 16, 2009 4:31 pm

Modules are hooked to menu items not articles in Joomla. You have to change the core files or the template to achieve this.

Have you seen the document Understanding Output Overrides in Joomla! 1.5

You can put some if statements in the code of the template to handle the modules or not.

Markyboy
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 12, 2008 11:21 am

Re: Assign itemID for each article

Post by Markyboy » Fri Jan 16, 2009 4:56 pm

Hi,

Yes i am aware that modules are hooked to menu items. That's why i have submitted this request here as i really would like to see that you can hook an menu item to a article.

I try another example:
Please review the following link
http://travel2.gr/index.php?option=com_ ... Itemid=404

As you can see com_janews is hooked up to Itemid 404 in the site. You'll see the modules on the right side when visiting this link.

Now click on the link which says.
Two greek seaman jailed in venezuela

Note that you will see the article only. Why? Because in the url you will not find an Itemid.
This happens basically to all articles.

But the article can also look like this:
http://travel2.gr/index.php?option=com_ ... Itemid=404

The only difference is that i added &Itemid=404 which will display the modules that i want here. For other articles i can choose to hook up another Itemid. It will give me a lot of freedom in what i want to show for each article.

Hope this will be another step closer to understanding...

Marc

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30814
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Assign itemID for each article

Post by Per Yngve Berg » Sun Jan 18, 2009 2:37 pm

Are you getting any closer to fixing your issue?

It is in the faq. How to control module display when linking to an article with no menu item

Also note the extension at the bottom of the article.

Markyboy
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 12, 2008 11:21 am

Re: Assign itemID for each article

Post by Markyboy » Sun Jan 18, 2009 6:46 pm

Hi,

Well to be honest... getting closer to a sollution would be the option in administrator that i have suggested. This is the most fast and efficient way to get that result. I have tried the extension and it might do the trick, but i fear still a huge amount of work for positioning modules there where i want them. Basically i could get away with the current structure when i would have the option i suggested. It will increase flexibilty enormously. I have included an example for admin.

Offcourse i have no idear how big this thing is in case it would be implemented, but my guess is that it would not be to difficult. Like said before...i just want to have the Itemid included in the url. thats all. (&Itemid=404)

Again i know you can work with external links and create that effect, but you loose the effect once you perform a search or people find an article in google... You will just get the article..nothing else...


Image

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30814
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Assign itemID for each article

Post by Per Yngve Berg » Sun Jan 18, 2009 7:09 pm

See this thread about adding fields to parameters.

l33p
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Tue Oct 21, 2008 7:57 pm
Location: Montreal

Re: Assign itemID for each article

Post by l33p » Wed Jan 28, 2009 11:00 pm

Hi Markyboy,

Articles that have ItemIDs are menu links. If you want an article to have an ItemID, you'll have to create a menu link linking to it... This is not a fix, but it's the only way to assign an ItemID to an article.

Good luck!

Markyboy
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 12, 2008 11:21 am

Re: Assign itemID for each article

Post by Markyboy » Thu Jan 29, 2009 7:35 am

Hi l33p,

Thanks for replying. As you most probably read i was aware to use external links(using menus) to get the result that i wanted. It is working by the way.... but...

once you get in a position like using for example a news component or perform a search for an article the whole concept of showing your article in a certain environment is gone... You will only see the article..nothing else... That's a waste of displaying related stuff that might interest people. (and advertisers)

For me the best way would be having an option to add &Itemid= to the url of an article, but still having the choice of leaving it blank...

Leaving the option blank means it will work as it does now... Entering a itemid means that the article is always displayed to the itemid that you hooked it up too. Gives me lots of flexibility.

Maybe someone can write a plugin do get this job done? I am not a coder so would not know how to do it, but a simple code that is adding the Itemid in the url of the article will do the job...


Markyboy

Markyboy
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 12, 2008 11:21 am

Re: Assign itemID for each article

Post by Markyboy » Thu Jan 29, 2009 7:36 am

Sorry about that. something strange happend and submitted the reply double... Don't see a delete button though.. :-[

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30814
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Assign itemID for each article

Post by Per Yngve Berg » Thu Jan 29, 2009 10:35 am

It works if you use internal links to the article in the menu.
Internal Links->Articles->Article->Article Layout.

orangesparkz
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Wed Aug 27, 2008 3:26 am

Re: Assign itemID for each article

Post by orangesparkz » Mon Mar 30, 2009 9:14 pm

Hi,
I am trying to do something similar. I didn't know if you were ever able to add parameters to the articles? I want to add a &Itemid field that would override a default Itemid, but not to an article, to a category within a gallery component I am using.

I am using the component, PhocaGallery, which is a great gallery program. Unfortunately it doesn't assign ItemId to the gallery categories. This makes it impossible to have 2 different side menus on 2 different top links.
See the two top links Backdrops and Rental Art http://oliphantstudio.com/main. Each has own side menu assigned to that link. Top links works fine, but when selecting a category from the Rental Art side menu, it will go to that correct category, but the menu defaults to the Backdrop side menu.
Backdrops &Itemid=5
Rental Art &Itemid=31
The side menu always defaults to &Itemid=5.

I want to either hardcode the Itemid for each category or add a parameter so to set the ItemId.
Does this make any sense? I think it is sort of the like the problem you were having. I'm pretty new to Joomla, so the article suggested about adding parameters was a little over my head.
Thanks!

paulholmes13
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Jul 29, 2009 10:35 am

Re: Assign itemID for each article

Post by paulholmes13 » Thu Jul 30, 2009 8:10 am

Not sure if this is what are are trying to achieve but I had a similar issue and used an external link not internal and you can change the itemid as much as you like and add additional parameters. This may be the completely wrong way to do this but it works! :)

index.php?option=com_content&view=category&layout=blog&id=xx&Itemid=xx

Cheers.

Paul

User avatar
feldon27
Joomla! Explorer
Joomla! Explorer
Posts: 334
Joined: Tue Aug 23, 2005 2:18 pm
Location: Houston, TX

Re: Assign itemID for each article

Post by feldon27 » Sun Aug 16, 2009 4:06 pm

This is the White Papers forum, also known as the Joomla 1.6 Planning Forum. Aren't ItemIDs going away in Joomla 1.6?

hendrix
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Oct 10, 2009 5:01 pm

Re: Assign itemID for each article

Post by hendrix » Thu Jan 07, 2010 10:28 pm

Markyboy, did you find a solution?? I want the same... Searching already for quite a while... :geek:

Regards,
Hendrik


Locked

Return to “Feature Requests - White Papers - Archived”