Advertisement

add article's ID to the bottom of an article

General questions relating to Joomla! 1.5 There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
Wundurra
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Sep 29, 2010 8:55 am

add article's ID to the bottom of an article

Post by Wundurra » Wed Sep 29, 2010 8:59 am

I've searched for awhile, and I've found alot about article's and ID's but havn't found anything relevant.

I would like to automaticly add a line at the bottom of each article that includes the article's ID, so I can refer to it from the website and know exactly what it's ID is to edit in Joomla.

Does this have to be typed into each article manually or can I add it as PHP into a template somehwere?

Thanks if you can help.

Advertisement
Alex Dobrin
Joomla! Hero
Joomla! Hero
Posts: 2487
Joined: Wed Jun 07, 2006 9:10 am
Location: Brasov - Romania
Contact:

Re: add article's ID to the bottom of an article

Post by Alex Dobrin » Wed Sep 29, 2010 10:00 am

If you didn't activated SEO you can see the id of each article in the URL, which is looking something like this:

Code: Select all

http://www.yourdomain.com/index.php?option=com_content&view=article&id=4.
This link is displaying the article with the ID 4.

Is that what you were searching for ?
My latest project - http://www.extraglaze.co.uk/

Wundurra
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Sep 29, 2010 8:55 am

Re: add article's ID to the bottom of an article

Post by Wundurra » Wed Sep 29, 2010 11:28 am

thanks, that will work sometimes, but not when there's multiple articles on the page.

I want to add the article id as text inside each article.

Alex Dobrin
Joomla! Hero
Joomla! Hero
Posts: 2487
Joined: Wed Jun 07, 2006 9:10 am
Location: Brasov - Romania
Contact:

Re: add article's ID to the bottom of an article

Post by Alex Dobrin » Wed Sep 29, 2010 11:37 am

Wundurra wrote:thanks, that will work sometimes, but not when there's multiple articles on the page.
The link to the full article is visible for each one, unless you deactivate it. :)
Wundurra wrote:I want to add the article id as text inside each article.
You can try output overrides ( http://developer.joomla.org/tutorials/1 ... oomla.html ) to modify the layout of your page to contain that ID.
My latest project - http://www.extraglaze.co.uk/

Wundurra
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Sep 29, 2010 8:55 am

Re: add article's ID to the bottom of an article

Post by Wundurra » Wed Sep 29, 2010 12:10 pm

This looks like just the thing I was looking for. I'll get to play with this tomorrow afternoon.

Thanks Alex.

Wundurra
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Sep 29, 2010 8:55 am

Re: add article's ID to the bottom of an article

Post by Wundurra » Thu Sep 30, 2010 9:33 am

Alex, that page is returning a 404 error. it worked last night but not now.

I looked through it last night but I'm not sure what code to use - my php is a bit rusty
Last edited by Wundurra on Thu Sep 30, 2010 9:38 am, edited 1 time in total.

Wundurra
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Sep 29, 2010 8:55 am

Re: add article's ID to the bottom of an article

Post by Wundurra » Thu Sep 30, 2010 9:38 am

Alex Dobrin wrote:The link to the full article is visible for each one, unless you deactivate it. :)
I don't want the id to be listed in the link, or url. I wanted the id as a 'footer' text inside each article / article preview. (I don't know the exaact turms to use to make it any clearer)

Advertisement

Locked

Return to “General Questions/New to Joomla! 1.5”