Keyword

New Joomla / K2 Admin Question How to find item UR

More
10 years 8 months ago - 10 years 8 months ago #123666 by Roger
I created a K2 item. Now I just want to reference it from another page using an anchor tag but WHAT / WHERE do I find the url for that item???

It doesn't make sense because I have other K2 items that are referenced as index.php/About/Mission or similiar. I don't see / understand what I am missing to get this items url????

Google is showing me alot of articles about sef urls, removing k2 categories, etc.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #123667 by Yiota
Could you provide a link to your item in order to check it out.

Thank you.

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

More
10 years 8 months ago #123668 by Roger
OK first here is my workaround. This wasn't my original design but it works for now.

the site is www.lamplighterguild.com

The work around is I added a menu item at the top right called Donate and linked that menu item to a k2 item. Again this works but not my original plan.



Original plan was on the homepage at the bottom you see in the carousel a picture Support Us. I wanted that to link to the K2 item that the menu Donate is currently linked to.



In K2 I have created a category called Donations and for the Title Alias (URL) donations.

In K2 Items I have an item called Make a Contribution and the Title Alias (URL) is make-a-contribution.


So all I wanted was to determine the url for Make A Contribution so I could update the anchor tag (<a href="">) for the support us picture in the carousel at the bottom.

I hope that is the information you were wanting from me.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #123669 by Yiota
One suggestion is to use the module's custom link and apply it to this 3rd element's image.
You can create a template override for this module,if you don't use already, and in the foreach element make an if statement right where the image is called, like
<?php if($params->get('itemImage') && isset($item->image) && ($params->get('itemCustomLink') && $key==2)): ?>
	      <a class="moduleItemImage" href="<?php echo $params->get('itemCustomLinkURL'); ?>" title="<?php echo JText::_('K2_CONTINUE_READING'); ?> &quot;<?php echo K2HelperUtilities::cleanHtml($item->title); ?>&quot;">
	      	<img src="<?php echo $item->image; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>"/>
	      </a>
	      <?php elseif ($params->get('itemImage') && isset($item->image): ?>
	      <a class="moduleItemImage" href="<?php echo $item->link; ?>" title="<?php echo JText::_('K2_CONTINUE_READING'); ?> &quot;<?php echo K2HelperUtilities::cleanHtml($item->title); ?>&quot;">
          <img src="<?php echo $item->image; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>"/>
        </a>
	      <?php endif; ?>

Then remove/comment out the custom link code at the bottom of the file.

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


Powered by Kunena Forum