How could I put a link in the unembedded vanilla to go to embedded vanilla?
Users can access our forum via wordpress
http://www.example.com/discussions-3/#/discussions
or non-embed
http://www,example.com/discuss/
I added a link to the banner menu in vanilla e.g. WPHOME
The link works fine when one is in the unembedded version and takes you to the embedded version.
However, because the embed is an iframe, if a user clicks on WPHOME while within the embedded version. There is recursion and the wordpress menu gets thrown within the iframe.
Is there a way to solve this without a redirect? If not what would be the best way to do the redirect.
I tried looking in remote.js to solve this but don't quite understand some of the variables e.g. foreign (could this be the clue).
same problem with custom pages.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Answers
you can use a wordpress plugin the breaks out of iframes, it is also useful for those that may use your site for spurious means
grep is your friend.
If you are using the embed friendly theme
grep is your friend.
Thanks for the feedback @x00
This looked promising but:
I added it to the default.master.tpl in the embed friendly theme.
When in the embedded wordpress. The first iteration worked I did not see my menu Item WPHOME displayed (exactly what I wanted, however when I clicked discussions from the vanilla menu bar WPHOME showed up, same with activity, etc.
I tried negating {if !(isset($smarty.get.remote)) } no luck either.
It looked very promising and very easy. Seems the setting is one way on the first go around within wordpress and then is set the other way the minute a vanilla menu item is clicked.
I know there is an AddLink
$Sender->Menu->AddLink
Is there a RemoveLink or some other way to make the menu item appear conditionally off for the first time viewed in wordpress and each additional time.
And on when viewed outside of wordpress and then swapped to on when going into wordpress?
I didn't look at the wordpress frame breakers - I got the drift from you message that this may not be too secure.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Sorry i forgot to negate.
are you using absolute paths for link? try relative.
you might try
Also what version of embed you you have? It should just work. Are you you sung the wordpress vanilla plugin to embed?
no I mean it stops third parties using bits of you site inside frames.
grep is your friend.
Thanks again for you effort.
I tried absolute and relative with your permutations - no success.
e.g.
http://www.example.com
I noticed on further testing of a test plugin
Upon loading Wordpress test on localhost
http://localhost/wordpress/discussions-2/#/discussions
$matches would match discussions-2 upon loading and subsequent clicks in the vanilla menu on discussion or activity would not match.
I guess the iframe effectively removes any concept of the discussions-2
I'll look at the frame breaker, any particular one you recommend?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I wonder if you are using old versions of the plugins, it should work. The iframe loader should link to an address with remote in it.
try WP No Frames
grep is your friend.
I hadn't installed plugin WP No Frames when I reported the results.
I installed the plugin you suggested.
So far, so good. WP No Frames
Thanks much.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.