2

When I create new content item in admin panel I want to know immediately sef url for this item. Is this possible using php code?

1 Answers1

0

Speaking about core content manager you not could not do this. Reason, until the item is't saved it is not into the database, and there is no id for it. You may play around with auto-saving and retrieving data by ajax, but it is much different from the bare functionality.

dmi3y
  • 3,482
  • 2
  • 21
  • 32
  • Yes, I mean after saving. I needed to do some operations (such as get sef url) after saving content in db – Maxim Ryabchenko Nov 29 '12 at 22:40
  • that would be easier, than you may need write own plugin of `editor` related group https://github.com/joomla/joomla-cms/tree/master/plugins/editors-xtd – dmi3y Nov 29 '12 at 22:47
  • Oh, maybe this is good way, but I do not know how to do this. Somewhere exists good instruction? – Maxim Ryabchenko Nov 29 '12 at 22:53
  • Just explore the core plugins around, they would speak by themselves, better than any instructions. – dmi3y Nov 29 '12 at 23:00
  • 2
    Well it depends what you mean by the SEF url. You can make A sef url, but the url that you actually get in Joomla depends on whether and where it is connected to a menu. The menu is what determines the exact url. There is a default generic url that depends on your alias and assumes that there is no menu link. – Elin Nov 29 '12 at 23:33