oky at August 10th, 2015 18:21 — #1
So I'm building a site that will have many instances of a main content type (blue). Each instance will have its own page, on which are displayed a number of images associated directly with that instance (orange).
I'd like each image to be assigned tags (green) that allow them to be pulled into a search page, regardless of which main content type instance they are associated with. For example, with the content in the image above, if the user viewed the page/results for "Tag 1", they'd see the following Images:
If they viewed the page/results for "Tag 5" they'd see:
So, the way I figure this structure can be accomplished is by creating three content types: Main, Image, and Tag. The Main content type has a relationship form field for Image (not the vanilla image form field). The Image content type has a reciprocating relationship to Main, as well as a relationship form field for Tag. The Tag content type then has just a reciprocating relationship to Image.
In order to display the images on either the Main content type pages or the Tag pages, I can just pull the associated Image relationship information from Main or Tag (main.images or tag.images).
So I guess I'm looking for confirmation on two things:
A) Will this structure work appropriately?
B) Is this the most efficient way (both in terms of performance and in terms of data entry convenience) to accomplish this?
This approach makes sense to me, I just want to make sure I'm not missing any problems or overlooking a better solution. Thanks for any feedback and assistance!
rdwatters at August 10th, 2015 20:37 — #2
@Oky Check out my prototyping/playground site here. You can click on the different tags within articles or also search by category. The full-screen search gives you some options too. Here is the github repo. If this is similar to what you're looking for, let me know. I haven't had a chance to play around with it for quite some time, but maybe I can share what I learned from making the site. - Ryan
oky at August 11th, 2015 16:35 — #3
Thanks for the reply @rdwatters. I don't think that's quite what I'm looking to do, but it was useful to take a look, so thanks for the link.
Basically I want a content type (i.e. Restaurants), each instance of which has a page (individual.html) that contains images. I want to be able to search for images on their own, however, pulling results from all of the different Restaurants' images. So if I were to search for, say, "jukebox" images, it would display all images containing a jukebox, pulling in images from across all Restaurants. Regardless of the approach, I definitely need a tag associated with the images (i.e. a tag called "jukebox").
I was playing around with the Repeatable Form widget in the form builder and it seems to do pretty much what I want except for the fact that the relationships included in the Repeatable Form aren't two-way. From the Dec '14 blog post ( http://www.webhook.com/blog/repeatable-form-widget-added-to-webhook/):
Any relationships included in repeatable forms are one-way only. They will only link outward from the repeatable item relationship, and not from what you are relating too.
So on the Restaurant form I could include a Repeatable Form widget that contains an Image field and a Tag relationship. This approach seems to be the simplest I can come up with in terms of ease of data entry. However, the lack of a two-way relationship seems to prevent the search functionality. For example, I wouldn't be able to just pull the images related to the "jukebox" tag since the relationship doesn't point from the tag to the image, only the other way around. Plus, I'm not 100% sure how I'd be able to use
item.grid.tag to get to
item.grid.image. ( If there's another way to accomplish this with the Repeatable Form widget despite the one-way nature of the relationship, that would be ideal.)
I still think the approach I described in the original post (in which I create content-types for Restaurants, Images, and Tags, then create relationships between them) will work. That approach, though, requires me to fill out a separate form for each and every image, then search for them when I try to tie them to the restaurant from the Restaurant form. That seems like it could get very tedious, very fast, especially once there gets to be more than a couple dozen images across the entire CMS. The nice thing about the Repeatable Form is that all data entry associated with the main content-type (Restaurant) happens within the one Restaurant form.
Also, I don't need individual URLs built out for each image, which is another reason why the Repeatable Form would work well.
So for now, I'm thinking I'll go the three content-type route, but it would be rad to determine a way to accomplish it with the Repeatable Form.
I haven't really worked with a CMS before, either from the user or the dev/design side, so this is a fun challenge trying to figure out the proper approach.
himanshu at November 10th, 2017 03:45 — #4
Thanks for this amazing post if you are really the online game lover then here on our homepage you will play free online happy wheels game online on your pc tablet and smartphone without any download and registration it is the multiplayer game based on the rag-doll theory of physics happy wheel is really an awesome and amazing game.