-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add support for if_has_content_for and unless_has_content_for #40
Comments
:+1 would love to see this sooner rather than later. |
I accept pull requests. 💯 |
@zeroedin I'll try to get to it at some point. Trying to get some other stuff done before the weekend. |
Ok an implementation note here. Because of the differences between the CMS and hammer as a tool, you will have to duplicate your editable_region region name in your page:
name: "Page Name"
...
content:
region_name_here: "Some Content"
editable_region:
main: "Main content"
...
region_name_here: "Some Content" The way this works is that it first checks to see if the current page has the content region With that said, without more testing it is possible in more complex looping in |
I set As Steve says, if you're pulling content from one page to another, then duplicating the content in the |
Fixed in 4eea618 |
These tags make it easier to only display an editable region & the region's surrounding tags if there is content that has been added to it.
Code Example:
Here's
unless_has_content_for
akaif_doesnt_have_content_for
:Location of tags in CleanSlate source:
lib/slate/radius/tags/page.rb
The text was updated successfully, but these errors were encountered: