Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How I can use Twig syntax inside editor? #99

Open
roulendz opened this issue Aug 22, 2017 · 2 comments
Open

How I can use Twig syntax inside editor? #99

roulendz opened this issue Aug 22, 2017 · 2 comments

Comments

@roulendz
Copy link

roulendz commented Aug 22, 2017

I want to make link to a page like this
<a href="{{ 'about-us'|page }}">Link to page</a>
And when I save it gets saved to
<a href="{{%20'about-us'%7Cpage%20}}">Link to page</a>
How to make editor not tinker with twig syntax?

Using Froala Editor

@roulendz
Copy link
Author

roulendz commented Aug 22, 2017

As I see, I need to pass href link as variable, because content blocks do not support twig syntax :(
https://octobercms.com/docs/cms/content#content-global-variables

But I can not figure how to do it, nothing returns eave my global variable, to the content block.

@gionmaster
Copy link

gionmaster commented Aug 23, 2017

same issue, you can partially solve that by leaving no blank space between tags, this: {{ 'aboutus'|page }}, instead of this:
{{ (blank) 'about-us'|page (blank) }}, at least it solve the problem for translate plugin, but this tag "|"(%7) is still an issue, maybe somebody will find a solution, i hope so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants