Need some help understanding how to associate content togther

Permalink
Just giving a simple Example. Let say I want to see CDs. So a CD is a peace of content with title, description, and a image. Now each CD has 1 or more tracks, Each track is a content item, it has the same fields as a CD plus an MP3 the user can download.

How does one do this??

I could create a page for each CD and then a subpage for each track... but that seems wrong... Do I need to create a block for a CD and then another block for the track? Or one block that can hold the CDs and the tracks?

CD 1
Track 1
Track 2..
CD 2
Track 1
Track 2..
CD 3..

 
enlil replied on at Permalink Reply
enlil
you may want to consider creating a page for each CD and having the rest of the info like credits, track list, etc on this page. Although It's a lot of work to create individual pages for each track, it's probably a better idea seo-wise to do so. Depending on the actual content of your site and the audience you're targeting, It's a decision to make, Save a lot of time vs. content...
JoshWegener replied on at Permalink Reply
I have over 140,000 tracks... I need to create an easy way to add them. like a form (block). And yes, each track should have it's own URL.
enlil replied on at Permalink Reply
enlil
thats 140,000 pages, plus all the pages for the cd's!! I think you're going to want to start by dividing the media into categories and then by CD, listing all the tracks for individual cd's on those pages. Once you get built up, you can start building the pages for all the tracks below the cd pages!!

NOTE: I'm hoping you've looked into the legalities of what you want to do. I'm not simply assuming what you're doing is illegal, as I have no exact idea what it is you're building... Rather, just a curious thought, as I don't like to encourage/support illegal activities ;)
JoshWegener replied on at Permalink Reply
This is 100% legal... I will post a link when I'm done :-)

So I should just create a CD page type, a track page type... And just create a lot of pages....

Seem like an odd approach...
enlil replied on at Permalink Reply
enlil
you may want to poke around and try to find an easier way to do it. If you're interested in building it from the front end there are some very useful add-ons in the marketplace...

http://www.concrete5.org/marketplace/addons/-/view/?submit_search=1...
JoshWegener replied on at Permalink Reply
Could toy point me in the right direction? I'm very new to concrete5, this is my first site with it. I'm selling a subscription to all my digital downloadable content. So the user pays $N per month, and gets access to all the data... but with 140,000+ pages, I need it to be easy to search, tag all the elements.... Any idea of a tool or plugin that could help with this?
enlil replied on at Permalink Reply
enlil
I've never used it personally, or for anyone else's site, but this guy is a solid coder and I use other add-ons of his on a few of my sites. Seems pretty solid and does exactly what you need!!

http://www.concrete5.org/marketplace/addons/lerteco-membership-comm...
enlil replied on at Permalink Reply
enlil
another add-on that is pretty straight forward is the Front End File Uploader. In combination with the List Files From Set add-on (or a similar add-on), it would definately speed up the process of creating the CD pages.

you would then be able to upload all the tracks for one CD page to a file set and then display them right there on the page for download. Most of this set-up would be automated by page type defaults. Like I mentioned before, once all those pages are built, and the tracks are all uploaded, you can then go back and start making individual pages for each of the tracks if you wish!

http://www.concrete5.org/marketplace/addons/front-end-file-uploader...
http://www.concrete5.org/marketplace/addons/list-files-from-set/...
JohntheFish replied on at Permalink Reply
JohntheFish
Just to underline what @enlil is recommending; pages and page types in concrete5 are often used as objects to create object-relationship structures.

In the discussion forums addon and this forum, each post is a page. There must be well over 140000 posts by now. Probably millions.

In pro-events, each event is a page. In blogs, each blog entry is a page.

Using pages is usually the easiest way to do it and has the advantage of automatically being searchable, listable and navigable via standard blocks. There are many addons that enhance that approach.

Another way to do it is design some custom objects for albums and tracks and a single page or blocks to show/search/sort/filter.

You could also look at eCommerce, where each product is a custom object. Not as a means of selling, but just as a means of organising the catalogue.

Something you may want to consider within any of the above is my Magic Data addon. That way you could have a few standardised stacks that would adapt to what the page is showing by page/product/custom-object attributes. It would make it much easier to perform global updates.

You should also look at using the Designer Content to create custom blocks that already contain boilerplate for the same reason.

Another way of managing the format globally is with custom coded page types.
JoshWegener replied on at Permalink Reply
Does this magic data add-on work with page types? Maybe I could create a page type for CDs and another page type for the tracks. Use page attributes to tie them together.
JohntheFish replied on at Permalink Reply
JohntheFish
If your site hierarchy was
/music
/music/cd1/
/music/cd1/track1/
/music/cd1/track2/
/music/cd2/
/music/cd2/track1/
/music/cd2/track2/

Then a CD page would be a page list of the track pages beneath it. All that is standard concrete5. There are some very sexy page list templates you could add from the marketplace to make that look really good.

Another approach would be for the tracks to be attributes of a CD, so you would have less pages, but also perhaps less flexibility:
/music
/music/cd1/ [trackattr = track1] [trackattr = track2]
/music/cd2/ [trackattr = track1] [trackattr = track2]

In either case, you don't need Magic Data to set up the structure. As I noted before, all that is standard concrete5.

What Magic Data does is pull data into a page and adapt to data. So you could for example have page type for tracks with a stack 'Track Details' that formatted everything you need to know about a track:

Track:[%PAGE PAGE_NAME%]
Artist:[%PAGE ATTRIBUTE Artist OR PAGE PARENT ATTRIBUTE Artist%]
Year:[%PAGE ATTRIBUTE Year%]
CD:[%PAGE PARENT PAGE_NAME%]
etc, but all nicely formatted.

That way, all your 'track' pages could be completely identical with a common stack 'Track Display' for the details, just repeated 140,000 times.

Each page would then be configured by setting the page attributes and would adapt to show the appropriate data. You can use Magic Data to pull in much more, for example, showing an image of the artist or CD cover from the file manager, or listing related tracks or CDs with links to them.

You could do the same with a custom block rather than using Magic Data. In this case the advantage with Magic Data is you wouldn't need a custom block and can easily change the format and even some of the track page content globally just by editing the 'Track Display' stack. As long as you can derive the content from an attribute or the page identity itself, everything will adapt.

At a higher level, you could do the same with a stack and Magic Data for CDs.

The reason for putting the track info into attributes is that attributes provide an easy way to make the entire repository searchable, filterable and sortable.

If you wanted to take it further and develop code for a pair of related custom database tables for CDs and Tracks with a custom dashboard section to manage them, for the front end you could create some custom symbols to extend Magic Data to pull information from those tables. That is pretty much what Magic Data Commerce does for the eCommerce addon.

http://www.concrete5.org/marketplace/addons/magic-data/...
JoshWegener replied on at Permalink Reply
Thank you so much! So I want to go with the page route...

[Top]
--[CD] (page)
----[Track1] (page)
----[Track2]
--[CD2]
... and so on

I can store the data in attributes and use magic quotes to pull in the data, but still have 1 page per tack, and 1 page per cd.

This brings me to my next question, how do I setup a "CD" page type? So I can just click create CD page, add the attributes, save and move to creating a track page?

Why I'm asking is because I would like to write an importer (I guess single page?) that will parse the MP3 names, create a CD page or track page if needed, fill in the attributes it can get from the file name, and then I can clean up the details later. This would save me from having to create all the pages by hand.


Side note, for things like categories, should I just stick that in "tags" or should I add that as a "category" attribute? I want to be able to show the data in a few different ways... like view CD by category...
enlil replied on at Permalink Reply
enlil
without too much detail, the easiest way to create a new page type is to log in to your site via ftp. Find right_sidebar.php, or a similar page which you would like to "clone".

Simply copy the right_sidebar.php file to my_custom_pagetype.php

now, in the dashboard, go to dashboard > page types. Install your new page type by adding the name of it, My Custom Page Type, and the handle, my_custom_pagetype.

You're done! Now when you create a new page you can select your custom page type!! And if you're going to be going the Magic Data route, there are a few simple lines you can add to your page type php file to make "Areas" automatically process Magic Data symbols!!
JoshWegener replied on at Permalink Reply
Please remember this is my first site :-)

I created the custom page, got that working, created some attributes sets and set them up so "cd_set" goes to the "cd_page" and so on.

Thanks so much for your help guys/girls

I'm going to setup a user group and then try to create a page via code (and assign it to that group). Then I just need to figure out how to attach the file via code, and how to add a category.

What is a good plugin for listing the sub pages of a CD (the track pages) so it looks nice? Too many add-on's... lol

Thanks again!
enlil replied on at Permalink Reply
enlil
I think for a simple track list, the core page list with some added design would do a good job!! There's tons of options though...
pvernaglia replied on at Permalink Reply
pvernaglia