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

Globalize Gobierto Site HTML blocks (2/2) #547

Closed
ferblape opened this issue Mar 22, 2017 · 3 comments
Closed

Globalize Gobierto Site HTML blocks (2/2) #547

ferblape opened this issue Mar 22, 2017 · 3 comments

Comments

@ferblape
Copy link
Member

In the road to Gobierto globalization, we need to make Site HTML blocks dynamically link to pages.

We are going to add Liquid to the three HTML blocks, so admins cuould use Liquid tags to refer to the CMS pages in a fancy way. For example, the following block:

The {{ page_link "privacy-page" }} page

When exists a GobiertoCms::Page with slug privacy-page and title Privacy, will result in:

The <a href="/privacy-page">Privacy</a> page
@furilo
Copy link
Member

furilo commented Mar 22, 2017

Also, take into account that this is an initial step towards making some or all of the templates editable through the admin by any user.

@furilo
Copy link
Member

furilo commented Mar 22, 2017

should we have

{{ page_name "privacy-page" }} => Privacy

and

{{ page_url "privacy-page" }} => privacy-page

so we can do

<a href="{{ page_url "privacy-page" }}">{{ page_name "privacy-page" }}</a>

?

@ferblape
Copy link
Member Author

Of course, I wanted the simplest version, but what you propose will make it more flexible without complicating the development very much.

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

No branches or pull requests

2 participants