Can anyone tell me if it's possible to define a Channel Field Group and then allow a user to create repeatable instances of it within a Channel Entry? I'd like to set up a Channel for Tutorials. Each Tutorial entry consists of a number of steps and each step consists of a block of text with an optional embedded image etc.
thanks,
C.
You want Pixel and Tonic's Matrix add-on.
Related
I went through all tutorials and docs which stream-django provided.
And there was one thing that I could't understand.
I can't find the differences between these feed_manager methods.
# (1)
feed = feed_manager.get_news_feed('timeline', request.id)
# (2)
feed = feed_manager.get_news_feed(request.id)['timeline']
# (3)
feed = feed_manager.get_news_feed(request.id)
Could you explain the difference? Are they doing exactly same thing? timeline means flat feed, then why do we put timeline in param?
Thank you
timeline is the name of the feed group that you've created within Stream.
Once you create a feed group in Stream, you'll select the type of feed group ("flat" in this case, but can also be "aggregated" or "notification"), then, you'll name the feed group - common names are timeline/news_feed (a homepage feed showing activity from other users) or profile/user (a profile page feed showing all activities from a single user). There are no "reserved" words in feed group names.
Re: whether or not these methods are all doing the same thing:
feed_manager.get_news_feed('timeline', request.id) (1) is definitely correct. It'll fetch the feed activities for the specific timeline:1234 feed, where 1234 is most likely your user's ID.
(2) and (3) I'm not sure about - it's likely that they're doing the same thing as (1), but I'm not able to tell at the first glance at the docs.
Hopefully that helps!
The Twist documentation for extracting concepts shows how multiple steps can be grouped into one step that contains those steps. For instance, the following eight fixtures
1. Start at the Maintain product catalog page.
2. The page title should be “Joe’s musical —Maintain Product Catalog.”
3. Click the Add New Instrument button.
4. The page title should be “Joe’s musical—Add New Musical Instrument.”
5. Enter text “Guitar” into the Instrument field.
6. Select “Slide” from the Type selection list.
7. Select “Dobro” from the Brand selection list.
8. Click the Save button.
Can be condensed into one concept:
1. Add a New Musical Instrument “Guitar” of type “Slide” and brand “Dobro”
However, the tutorial doesn't say if it's possible to use this concept with other parameters (perhaps with "Drum" instead of "Guitar"). However, it does clearly say that parameters in the concept name should be surrounded by quotes, but they also should match the parameter name, so it's not clear if it's possible.
So can I use parameters with Twist concepts?
Yes! The documentation is really crummy about making this clear, but it is absolutely possible.
If you extracted a concept in the way that they described in the tutorial you referenced and others, then the fixture Add a New Musical Instrument “Guitar” of type “Slide” and brand “Dobro” actually contains three parameters named Guitar, Slide, and Dobro. What makes this so confusing is in each scenario you can change the value of each parameter to whatever you like (perhaps "Drum", "Snare", "Yamaha"), but under the hood, the variables are still called by their original names (thus Guitar=Drum, etc.) and these original names will appear as default values whenever you add the concept to a scenario.
To eliminate confusion, I recommend changing these default names. In this case, it might be Add a New Musical Instrument “Instrument” of type “Type” and brand “Brand”. Bizarrely, you can't rename the parameters via "Rephrase the Open Concept" because you run into a catch-22 situation. You can't change the name of the concept because it doesn't match the usage in the fixture. And you can't rename the fixtures because the parameters are bound to the concept name. So I recommend just opening it up in the text editor and making the change there.
So bottom line, the examples make it seem like you can't use parameters because the parameters wind up being named after whatever value you inputted. I recommend changing the default parameter names, but you have to do it in the text editor because Twist won't let you.
I have a working template that is included in the right rail of my EE site.
This template pulls from a channel that simply relates entries from other channels to this specific channel on a one-to-one basis and is used as a sort of "highlight reel" or "Top 5" for the sidebar. The relationship is using Playa to link multiple different channel's entries to this one.
It works throughout the site with exception to an entry's view template. In that template it only returns with highlighted entries that match that channel. I am simply using the same embed code for another template that is embedded into every page. It embeds like:
index <- right_rail <- highlight_reel
For example, the highlight reel can pull from Activities, Events, and Food channels using Playa for the relationship. When you navigate to the view template of a particular Events entry this only displays Events entries that have been related.
Is there a configuration or parameter that needs to be set in order to keep the results consistent?
Let me know if there is anything else that would help you help me.
Some additional code for the loop:
{exp:channel:entries channel="most_popular" dynamic="yes" orderby="date" sort="desc" limit="5"}
{exp:playa:children field="popular_entry" status="not closed" disable="members" limit="1"}
Thanks a bundle in advance!
I was directed to a similar question that was asked and it totally solved the issue.
My mistake was that I had assumed that it would maintain the entry_id but by embedding it I was able to solve it.
Thanks a bunch!
I am new to stackoverflow because I almost never ask questions in forums as there are plenty of questions out there already answered. However my head is about to explode from trying to figure out how to do this app.
First I do this using XCode 4.5.2 for OSX 10.8 deployment of a personal (that is for my use only) double entry accounting software.
Each accounting entry consists of a header of various text fields such as the entry date, a serial number, etc. which I created an Entity called "Entry". Also each such entry has multiple lines such as the various accounts related to that entry, amounts, etc. called an Entity "EntryLine" linked in the model nice and easy.
The thing is that I intended to use text field for the basic header info and below it a linked Table View for each of the line. Being an accounting software there are several checks (validations) that I need to make and I need full control of what is going on. Already tried binding two array controllers, one for each entity and linking the two and saving them to the sqlite file but to no avail!
Now I have an app with just the header up and running by manually getting and setting the info in the top text fields as I please and saving them to the file. But I have no idea how to do the part with the Entry Lines in the Table view. Can I do that manually too or is it better to do bindings through an array controller?
Also tried already with array controller but I get "Table View Cell" when I add a new line in the table. Any ideas on that?
In the Table View there is also an "Account Name" part that is NOT part of the EntryLine entity but my intention is to obtain this information from another entity called "Account" that stores the Account Number and Account Name. On input of the account number that is, the app would skip the name field and move to particulars for input but also bring up the name of the account already inputted. Is this even possible?
Sorry for being a bit vague in my questions but I come from routine program oriented languages and not object oriented one, though I have some Java experience. Any help would be appreciated. No screenshot sorry as I am not yet allowed:(
How would I include contents from one channel into another channel?
For instance, If I have a channel of projects. And then I'd like to add items within that project.
Project
- Item
- url
- caption
- Item
- url
- caption
There is an new free alternative to Matrix: Grid Lite
Matrix is maybe over the top for your needs, even if it is one of my favorite EE addon.
I can think of three approaches here:
Use a Matrix field within your Project channel to add multiple items to each project.
Make a "Project Items" channel, and in that channel add a relationship field (or Playa field) that points to your Projects channel. This would link each item with its parent Project. When displaying your Project on the front-end, you'd use reverse-related entries to display that Project's items.
Make each Project a category, and then assign each entry in your Project Items channel to the proper Project category. (The downside here is that categories can only have very limited data associated with them - name, description, and image.) On the front-end you'd use the Channel Categories tag to display your Projects (categories), then then list that Projects items below using the Channel Entries tag and the category parameter.
Each of these approaches would work!
It sounds like you already have these two channels set up, so Matrix or Grid Lite, while great solutions, would require a lot of migrating work on your part.
Do you have a custom field that relates the two channels right now? i.e. in the Items channel, is there a custom field that allows you to choose (or write) which project the item belongs to? If that's the case, I can work toward a solution from there.