How do I show item's link in item.php

More
14 years 1 month ago #5899 by iLLeT
I want to use a retweet button, but I need the URL to the page it is currently on.
Code:
{ "url": "<?php LINK TO THIS PAGE ?>", "title": "<?php echo $this->escape($this->fields['title']->display); ?>" }

Anybody know how to get the items url?

Why join the Navy? when you can be a pirate.

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #5907 by TheSoMeEx
Good question. I'll be watching for the answer. This has a lot of potential uses.

--
Heather M. Claus
910-538-8901
I'm Building a Network of Niche Sites with a Shared Community - in BETA now!
www.365DaysofStyle.com
www.twitter.com/365DaysofStyle

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #5930 by kenmcd
.
I got these from the Joomla docs website.
docs.joomla.org/JFactory/getURI
docs.joomla.org/JURI/getInstance

This worked:
Code:
<?php $u =& JFactory::getURI(); echo 'URI is: ' . $u->toString() . "\n"; ?>
and this worked:
Code:
<?php $u =& JURI::getInstance(); echo 'URI is: ' . $u->toString() . "\n"; ?>

These both display this on the page (for example):

URI is: www.joomla15.test/index.php?option=com_f...guidelines&Itemid=53


I tried using:
FlexicontentHelperRoute::getItemRoute()
and could not get it to work properly.
Could not figure it out.

.

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #6005 by TheSoMeEx
The problem I see here is the length of the URL. That would take up a whole tweet!

Got to be a better way, IMO.

I'm working with Anton at WOWjoomla.com to enhance his Digg motivator for tweeting, blogging, email recommendations, etc.

Perhaps he'll have some insight into this.

--
Heather M. Claus
910-538-8901
I'm Building a Network of Niche Sites with a Shared Community - in BETA now!
www.365DaysofStyle.com
www.twitter.com/365DaysofStyle

Please Log in or Create an account to join the conversation.

More
14 years 1 month ago #6007 by vistamedia
It depends on the alias you choose, otherwise there's an option in tweetmeme that auto-shorten urls
Cheers,
Emmanuel.

FLEXIcontent lead developer.
www.vistamedia.fr web agency and custom development.
www.joomla.fr co-administrator.
Please no PM for support request, use the forum for that!!!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.281 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline