Front-end link for custom editor-xtd button

More
5 years 2 months ago #77236 by riiich
Hi there,

I've made a custom editor-xtd button which calls an iframe in a modal box. In the back-end the link for the button works fine, but on the front-end it's not being found. The code for the link I'm using:

$link = 'index.php?option=com_flexicontent&view=item&layout=mybutton&tmpl=component&e_name=' . $name . '&' . JSession::getFormToken() . '=1';

I see the link on the back-end goes in the administrator directory (where the files are located) whereas the front-end is from the root. However I see the other editor-xtd buttons are not going to the administrator directory but they are being found. Any idea what my issue could be? Initially I made this for non-flexicontent Joomla purposes and had the files located in the 'com_content/views/article/tmpl' directory but I moved them in to 'com_flexicontent/views/item/tmpl' as to get around the redirect from 'com_content' to 'com_flexicontent' issue I was having.

Thank you for your time.

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

More
5 years 2 months ago #77237 by riiich
Just to add to this, what may be helpful is if you could tell me how Flexicontent redirected my 'com_content/views/article/tmpl' link but it does not redirect the pagebreak editor-xtd button that has the front-end link 'index.php?option=com_content&view=article&layout=pagebreak&tmpl=component&e_name=jform_text' ?

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

More
5 years 2 months ago #77239 by ggppdk
Hello

redirection (page reload) or rerouting (no page reload, this is the default configuration) happens at
plugins/system/flexisystem/flexisystem.php

by using Joomla event
onAfterRoute
function onAfterRoute()

which neat its end will call our methos
Code:
// Redirect backend article / category management, and frontend article view $app->isClient('administrator') ? $this->redirectAdminComContent() : $this->redirectSiteComContent();

layout pagebreak is excluded from redirection OR rerouting


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.934 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