Unable to assign Article to blog when Blog (Parent) is created after Article

(Danny) #1

I created a Blog style app and I created articles first before figuring out that I needed a Blog node in order to display Articles in an index view.

It turns out that I cannot add articles to the newly created blog from within the backend.
This is more of a feature request.
I’m very new to this CMS so if threre is a way to do it please let me know.

Other questions I have:
How do I get a list of articles associated with a particular tag stored in tag_list?
How can I make additional variables available in my views (where is the controller)?

The documentation is very brief and there are no Stack Overflow questions.

(Aaron Russell) #2

Hi @danobot, there’s no way in the admin UI for changing a node’s parent. Right now this is a manual job through the rails console:

# Assuming you only have one blog
parent = Blog.first
Article.update_all parent_id: parent.id

Your other two questions are good FAQs so I'm going to try and split these in to separate topics to help others find them...

(Aaron Russell) #3

Have answered your other two questions in the following topics: