Timeline for Using a plugin, how can I manipulate entry data?
Current License: CC BY-SA 3.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 24, 2014 at 5:28 | vote | accept | user3309362 | ||
Jun 20, 2014 at 16:44 | history | edited | Lindsey D |
TAGS: Removed "plugins" because "plugin-dev" is more appropriate. Removed "controller" because it is not relevant.
|
|
Jun 19, 2014 at 8:26 | comment | added | user3309362 | I know it is not a traditional scheme but its like the person I am making this for wants to have a field in the color channel that he chooses himself to associate with books but he wants a field in the books channel to be automatically associated with the color channel. | |
S Jun 19, 2014 at 8:21 | history | suggested | Lindsey D | CC BY-SA 3.0 |
Rephrased title as a question
|
Jun 19, 2014 at 7:52 | review | Suggested edits | |||
S Jun 19, 2014 at 8:21 | |||||
Jun 19, 2014 at 7:40 | answer | added | Lindsey D | timeline score: 7 | |
Jun 19, 2014 at 7:18 | comment | added | Lindsey D | Not being critical, just curious... What is the purpose behind each section (Books & Colors) having a reference to each others' ids? As in, why does Books have a colorId field and Colors has a bookId field? This isn't traditional database architecture... If it is a one-to-many relationship, then only one section needs to reference the other. If it is a many-to-many relationship, then the connecting data will be stored in the craft_relations table. | |
Jun 19, 2014 at 6:05 | comment | added | user3309362 | So as an example lets say I have two sections Books and Colors. Also each entry of Colors has a field of bookId, and each entry of Books has a field colorId. I save an entry of Colors with bookId 24 and it should automatically add the this newly saved color entry's id in the Book entry with id 24 (in the colorId field). | |
Jun 19, 2014 at 5:58 | comment | added | user3309362 | Ok so basically what i want to do is when i save an entry it should fire up a method that based on the value of the content ( a specific field "Field1" ) of the saved entry ("Entry1") finds another entry ("Entry2") with another field ("Field2") whose value is same as Field1 and modifies the value of another field ("Field3") in Entry2 to reflect the value of Entry1's id. | |
Jun 19, 2014 at 4:14 | comment | added | Bryan Redeagle | I would need more information about your plugin and what you wish to accomplish with it before I can give the most accurate answer. | |
Jun 19, 2014 at 3:25 | comment | added | user3309362 | Yeah I would use Services, Records and models but I do not have an idea how to use a record with a table outside of my own plugin. I mean is there a way to associate a record with the default contents table in the craft database? | |
Jun 19, 2014 at 3:06 | review | First posts | |||
Jun 19, 2014 at 8:42 | |||||
Jun 19, 2014 at 3:01 | answer | added | Bryan Redeagle | timeline score: 2 | |
Jun 19, 2014 at 2:55 | comment | added | Bryan Redeagle | Why would you need to edit the raw data, and not manipulate it via Services, Records, and Models? | |
Jun 19, 2014 at 2:47 | history | asked | user3309362 | CC BY-SA 3.0 |