Linking to content items

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
iparker
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Dec 06, 2006 1:50 pm

Linking to content items

Post by iparker » Mon Oct 01, 2007 4:10 pm

Hi,

I'm sure this another of those questions that really easy when you know how but I'm really struggling with it.

I basically want to make text links to articles that I haven't got published in a menu.  how is this accomplished?  If I click the {link} option from the WYSIWYG menu it brings up to insert the URL but I'm not even 100% sure to establish what the URL link is to the article without first adding it to a menu.

Please can you put me out of my misery!! I've tried a lot before coming here to ask.

Kind Regards as always to one of the best open source communities

Ian Parker

timwhit
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Tue Dec 19, 2006 7:47 pm
Location: Chicago, IL

Re: Linking to content items

Post by timwhit » Tue Oct 02, 2007 8:39 pm

If you are running 1.0.13 the easiest way is to install the JCE editor. It has a button which allows you to add a hyperlink to an existing article on your site.

If you are running 1.5 you are basically out of luck at this point.

Well, you could create a new menu item that is linked to the article, copy the URL, then paste the link into the article you want to link from. This really needs to be included in TinyMCE, who knows when JCE will release a new version compatible with 1.5.

jacy
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Sun Sep 24, 2006 3:20 pm

Re: Linking to content items

Post by jacy » Sun Nov 04, 2007 1:08 pm

Came here to find if there was anything new on this as 1.5 nears prime time. Hope this functionality is added soon!

In the meantime, I've found the fastest way is to use the Search feature. Hopefully the page to which I want to link is returned as a result, if not I have other problems! I navigate to the desired page then copy and paste the portion of the URL that I need.

A couple of my articles have lists to other articles in the same section/category and once I got the first list item's URL down, I was able to add other link URLs quickly by capturing the article ID from the admin article manager window listing. But for onsie-twosie links I found the Search tool is the fastest.

HTH
~Jacy

capkix
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Wed Sep 26, 2007 10:21 pm
Location: Minnesota

Re: Linking to content items

Post by capkix » Mon Nov 19, 2007 5:22 am

You aren't out of luck at all with Joomla 1.5 - you just need to look up the article id.

Here is the format without SEF turned on:

http://>/index.php?option=com_content&view=article&id=>
http://mywebsite.com/index.php?option=c ... le&id=1234

With SEF on:

http://>/component/content/article/>
http://mywebsite.com/component/content/article/1234

With SEF on and  add suffix to URLs on:

http://>/component/content/article/>.html
http://mywebsite.com/component/content/ ... /1234.html

Hope that helps,  :pop


Nash

shambeko
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Sat Sep 22, 2007 8:48 pm
Location: Ribble Valley, United Kingdom
Contact:

Re: Linking to content items

Post by shambeko » Thu Nov 22, 2007 6:12 pm

Has anyone got this to work, all I want to do is place a text link back to another article (which is not assigned to a menu)

I have SEF ON and URL suffixes ON....

Any ideas, I am running RC3...


Thanks


Ian
Remember, it's all in the gleam of a scientists eye !
http://www.strokeofgenius.co.uk

capkix
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Wed Sep 26, 2007 10:21 pm
Location: Minnesota

Re: Linking to content items

Post by capkix » Thu Nov 22, 2007 11:43 pm

Ian,

Have you tried this?

http:///component/content/article/.html

It should work.



Nash

shambeko
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Sat Sep 22, 2007 8:48 pm
Location: Ribble Valley, United Kingdom
Contact:

Re: Linking to content items

Post by shambeko » Thu Nov 22, 2007 11:54 pm

Whey hey....Thanks Nash

Seems to have done the trick


Cheers


Ian
Remember, it's all in the gleam of a scientists eye !
http://www.strokeofgenius.co.uk

shambeko
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Sat Sep 22, 2007 8:48 pm
Location: Ribble Valley, United Kingdom
Contact:

Re: Linking to content items

Post by shambeko » Fri Nov 23, 2007 10:50 am

Well, ignore my last post.....

Although that allows me to link between articles, it does not help with a SEF URL because I end up with this -

http://mysite.co.uk/component/content/article/3.html - where 3 is the Article ID....

I would love to hear other users experiences or comments

Thanks

Ian.
Remember, it's all in the gleam of a scientists eye !
http://www.strokeofgenius.co.uk

capkix
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Wed Sep 26, 2007 10:21 pm
Location: Minnesota

Re: Linking to content items

Post by capkix » Fri Nov 23, 2007 3:24 pm

Ian,

From your last post I understand that http://mysite.co.uk/component/content/article/3.html isn't working for you.  This is odd because it is working fine for me with Joomla 1.5RC3 and SVN.

Can you try to do a search for your article and see what URL comes up?  If the URL that comes up in the search works, please post its format here so we can see.


Nash

shambeko
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Sat Sep 22, 2007 8:48 pm
Location: Ribble Valley, United Kingdom
Contact:

Re: Linking to content items

Post by shambeko » Fri Nov 23, 2007 3:31 pm

Nash

Yeah it works, but I loose my ability to have a SEF URL...

On menu linked articles, I get a URL like http://www.mysite.co.uk/services/content_mangement.html whereas, why I link the text to another article I get http://www.mysite.co.uk/services/3.html&nbsp; - can you see why I am not happy with this...

There must be an answer to this....

Ian.
Remember, it's all in the gleam of a scientists eye !
http://www.strokeofgenius.co.uk

capkix
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Wed Sep 26, 2007 10:21 pm
Location: Minnesota

Re: Linking to content items

Post by capkix » Fri Nov 23, 2007 3:44 pm

EEeeep.  That is unfortunate...

Perhaps someone with a bit better understanding of this could post a better explanation that preserves the J!1.5 feature of consistent SEF urls.

shambeko
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Sat Sep 22, 2007 8:48 pm
Location: Ribble Valley, United Kingdom
Contact:

Re: Linking to content items

Post by shambeko » Fri Nov 23, 2007 4:00 pm

Let's hope so Nash, text links from article to article seem to be a basic requirement...

I hope there is someone who can join this thread and shed some light on it !


Ian.
Last edited by shambeko on Fri Nov 23, 2007 4:02 pm, edited 1 time in total.
Remember, it's all in the gleam of a scientists eye !
http://www.strokeofgenius.co.uk

MaxRathbone
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed Nov 21, 2007 5:54 pm

Re: Linking to content items

Post by MaxRathbone » Fri Nov 23, 2007 11:50 pm

Thank you capkix! I knew with SEF & mod_rewrite there are more than one way to link to an article..I just needed one that is at least SEF... THANK YOU. Been waiting for a response on my thread, but at least this gets me headed in the right direction again!!

Amazing that such a simple thing as finding out the URL is so difficult and requires 'special' knowledge(out of the WYSIWYG) to know.
capkix wrote: You aren't out of luck at all with Joomla 1.5 - you just need to look up the article id.

Here is the format without SEF turned on:

http://>/index.php?option=com_content&view=article&id=>
http://mywebsite.com/index.php?option=c ... le&id=1234

With SEF on:

http://>/component/content/article/>
http://mywebsite.com/component/content/article/1234

With SEF on and  add suffix to URLs on:

http://>/component/content/article/>.html
http://mywebsite.com/component/content/ ... /1234.html

Hope that helps,  :pop


Nash

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Re: Linking to content items

Post by yvolk » Fri Nov 30, 2007 7:45 am

shambeko wrote: Yeah it works, but I loose my ability to have a SEF URL...

On menu linked articles, I get a URL like http://www.mysite.co.uk/services/content_mangement.html whereas, why I link the text to another article I get http://www.mysite.co.uk/services/3.html&nbsp; - can you see why I am not happy with this...

There must be an answer to this....
Very interesting and really important feature: linking to content items. First time I faced this problem 7 years ago, developing my own specialized (distance learning) web application, that had content publishing features (so in fact, it was CMS  :) )...

I came to the conclusion, that this links between Articles ('content items'...) should be dynamic!
So, I think, that best and universal approach is something like 'special type of BBCodes' inserted into Articles and converted to Hyperlinks on the fly.
There may be three variants, referring to Articles by:
1. id, e.g. [contentid=3]Content management[/contentid]
2. alias, e.g. [contentalias=content_mangement]Content management[/contentalias]
(I copied your alias, that is mistyped  ;))
3. article title, e.g. [contenttitle]Content management[/contenttitle].

Joomla has built-in ability to construct URLs to Articles, according to the current site settings: so dynamically created links would be just the same, as links, created (also dynamically) for e.g. "Latest news" (from modules\mod_latestnews\helper.php file):

Code: Select all

$lists[$i]->link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid));
And the last point: There is already such BBCode plugin, that may be extended to process this Joomla!-specific BBCodes: yvBBCode.

What, pals, do you think about this? Maybe some corrections/additions to my proposal?
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

MaxRathbone
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed Nov 21, 2007 5:54 pm

Re: Linking to content items

Post by MaxRathbone » Fri Nov 30, 2007 4:44 pm

I, for one, would love to see this kind of dynamic linking inside Joomla:
[contentid=3]Content management[/contentid]

annunaki
Joomla! Intern
Joomla! Intern
Posts: 89
Joined: Sun Oct 23, 2005 9:08 pm
Location: België

Re: Linking to content items

Post by annunaki » Sat Dec 01, 2007 1:44 pm

or just the same way as it's currently done in to link a menu item to a content item? That's a very elegant solution, and you won't have to look up the contentid

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Re: Linking to content items

Post by yvolk » Sat Dec 01, 2007 5:03 pm

annunaki wrote: or just the same way as it's currently done in to link a menu item to a content item? That's a very elegant solution, and you won't have to look up the contentid
This means, that you proposes linking to the "Menu item"!
E.g. [itemid=3]Title for the link to the Menu Item[/itemid]
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

annunaki
Joomla! Intern
Joomla! Intern
Posts: 89
Joined: Sun Oct 23, 2005 9:08 pm
Location: België

Re: Linking to content items

Post by annunaki » Sat Dec 01, 2007 6:24 pm

No, I mean linking to the content item; I just like the way that happens when you link a menu item to a content item; i.e. the javascript-lightbox

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Re: Linking to content items - implemented in yvBBCodes

Post by yvolk » Sun Dec 02, 2007 9:40 am

yvBBcode extension was extended to support links between Articles.
Currently yvBBCode supports one BBCode for this purpose: contentid.
E.g. [contentid=3]Content management[/contentid] is replaced by the link to the Article with id=3.

I tried to create links exactly like Joomla! itself does it  :), though it appeared, that there was no function e.g "ContentIDToURL" ready to use...

Do you like this implementation of "Linking to content items"?

For general discussion about this extension (and bug reports...) please see this topic: yvBBCode - BBCodes extension for Joomla! 1.5.
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html


Locked

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