Keyword

Jump to item

  • Big Ron
  • Big Ron's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 8 months ago #136132 by Big Ron
Jump to item was created by Big Ron
So I have a category page which loads 100 + items. These items represent pages and I thought it would be a good idea to allow the use to type a page number into an input box and then go directly to that item/page.

The problem I have is the URLs are like so:

/item/5847-page-1

So the ID number could be anything which makes it impossible to code this. Is it possible to stop the ID from being generated for these items so it appears like so:

/item/page-1

That way I can generate a link from their input.

Many thanks

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #136136 by Krikor Boghossian
Replied by Krikor Boghossian on topic Jump to item
You can use K2's advanced SEF settings to shape your URLs.
This setting is located under K2's parameters.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Big Ron
  • Big Ron's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 8 months ago #136175 by Big Ron
Replied by Big Ron on topic Jump to item
Is this recommended though? I have just noticed that if you copy over an item and forget to delete the url alias it will generate the same URL as the copied item.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #136187 by Krikor Boghossian
Replied by Krikor Boghossian on topic Jump to item
If an ID is not present then you need to have different aliases so K2 can fetch the proper item. The same applies to categories.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Big Ron
  • Big Ron's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 8 months ago #136214 by Big Ron
Replied by Big Ron on topic Jump to item
I thought so. Just for my own sanity ... is there a way to query the k2 database to see if any items do have the same alias? Im pretty sure that wont be the case but my site has hundreds of items and I wouldnt mind double checking.

Thanks

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #136228 by Krikor Boghossian
Replied by Krikor Boghossian on topic Jump to item

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Big Ron
  • Big Ron's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 8 months ago #136274 by Big Ron
Replied by Big Ron on topic Jump to item
Thanks - very helpful.

Just one further question ... is there anyway to output the title alias in item.php ?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #136312 by Krikor Boghossian
Replied by Krikor Boghossian on topic Jump to item
Try this snippet
<?php echo $this->item->alias; ?>

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Big Ron
  • Big Ron's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 8 months ago #136320 by Big Ron
Replied by Big Ron on topic Jump to item
Many thanks, Krikor

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #136325 by Krikor Boghossian
Replied by Krikor Boghossian on topic Jump to item
You 're welcome Ron.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum