The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 19 posts ] 
Author Message
 Post subject: Linking to content items
PostPosted: Mon Oct 01, 2007 4:10 pm 
Joomla! Apprentice
Joomla! Apprentice

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


Top
 Profile  
 
PostPosted: Tue Oct 02, 2007 8:39 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Dec 19, 2006 7:47 pm
Posts: 31
Location: Chicago, IL
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.


Top
 Profile  
 
PostPosted: Sun Nov 04, 2007 1:08 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Sep 24, 2006 3:20 pm
Posts: 40
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


Top
 Profile  
 
PostPosted: Mon Nov 19, 2007 5:22 am 
Joomla! Intern
Joomla! Intern

Joined: Wed Sep 26, 2007 10:21 pm
Posts: 52
Location: Minnesota
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


Top
 Profile  
 
PostPosted: Thu Nov 22, 2007 6:12 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Sep 22, 2007 8:48 pm
Posts: 39
Location: Ribble Valley, United Kingdom
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


Top
 Profile  
 
PostPosted: Thu Nov 22, 2007 11:43 pm 
Joomla! Intern
Joomla! Intern

Joined: Wed Sep 26, 2007 10:21 pm
Posts: 52
Location: Minnesota
Ian,

Have you tried this?

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

It should work.



Nash


Top
 Profile  
 
PostPosted: Thu Nov 22, 2007 11:54 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Sep 22, 2007 8:48 pm
Posts: 39
Location: Ribble Valley, United Kingdom
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


Top
 Profile  
 
PostPosted: Fri Nov 23, 2007 10:50 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Sep 22, 2007 8:48 pm
Posts: 39
Location: Ribble Valley, United Kingdom
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


Top
 Profile  
 
PostPosted: Fri Nov 23, 2007 3:24 pm 
Joomla! Intern
Joomla! Intern

Joined: Wed Sep 26, 2007 10:21 pm
Posts: 52
Location: Minnesota
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


Top
 Profile  
 
PostPosted: Fri Nov 23, 2007 3:31 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Sep 22, 2007 8:48 pm
Posts: 39
Location: Ribble Valley, United Kingdom
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


Top
 Profile  
 
PostPosted: Fri Nov 23, 2007 3:44 pm 
Joomla! Intern
Joomla! Intern

Joined: Wed Sep 26, 2007 10:21 pm
Posts: 52
Location: Minnesota
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.


Top
 Profile  
 
PostPosted: Fri Nov 23, 2007 4:00 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Sep 22, 2007 8:48 pm
Posts: 39
Location: Ribble Valley, United Kingdom
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.

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


Last edited by shambeko on Fri Nov 23, 2007 4:02 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Nov 23, 2007 11:50 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Nov 21, 2007 5:54 pm
Posts: 11
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


Top
 Profile  
 
PostPosted: Fri Nov 30, 2007 7:45 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Thu Jun 01, 2006 1:52 pm
Posts: 979
Location: Moscow, Russia
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:
$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


Top
 Profile  
 
PostPosted: Fri Nov 30, 2007 4:44 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Nov 21, 2007 5:54 pm
Posts: 11
I, for one, would love to see this kind of dynamic linking inside Joomla:
[contentid=3]Content management[/contentid]


Top
 Profile  
 
PostPosted: Sat Dec 01, 2007 1:44 pm 
Joomla! Intern
Joomla! Intern

Joined: Sun Oct 23, 2005 9:08 pm
Posts: 89
Location: België
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


Top
 Profile  
 
PostPosted: Sat Dec 01, 2007 5:03 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Thu Jun 01, 2006 1:52 pm
Posts: 979
Location: Moscow, Russia
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


Top
 Profile  
 
PostPosted: Sat Dec 01, 2007 6:24 pm 
Joomla! Intern
Joomla! Intern

Joined: Sun Oct 23, 2005 9:08 pm
Posts: 89
Location: België
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


Top
 Profile  
 
PostPosted: Sun Dec 02, 2007 9:40 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Thu Jun 01, 2006 1:52 pm
Posts: 979
Location: Moscow, Russia
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 



Who is online

Users browsing this forum: No registered users and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group