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

if/unless products #2

Open
dirkkelly opened this issue May 14, 2010 · 1 comment
Open

if/unless products #2

dirkkelly opened this issue May 14, 2010 · 1 comment

Comments

@dirkkelly
Copy link
Member

Need tags for whether or not there are products within the current context

@dirkkelly
Copy link
Member Author

desc %{ renders if products are available }
tag 'shop:if_products' do |tag|
tag.expand unless find_shop_products(tag).empty?
end

desc %{ renders if no products are available }
tag 'shop:unless_products' do |tag|
tag.expand if find_shop_products(tag).empty?
end

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

1 participant