Hierarchical pages navigation in Jamroom

sekeri
sekeri
@ilker
9 years ago
334 posts
Okay, I plan to enable my users to submit reviews on my website. I have some ideas on how to make submitting part. But displaying reviews in Hierarchical pages where I really need help.

Let me give more details;

I have main reviews categories like; Concert, Book, Guitar, Equipment
and 2nd line Guitar->Electric
and 3rd line Guitar->Electric->Fender
and 4th line Guitar->Electric->Fender->American Deluxe Stratocaster® V Neck
and last Guitar->Electric->Fender->American Deluxe Stratocaster® V Neck-> Review 1
Guitar->Electric->Fender->American Deluxe Stratocaster® V Neck-> Review 2

So I have no idea how I can set the navigation for this in Jamroom. For example, when user clicks on Guitar->Electric->Fender then all fender models should be listed for navigating in deeper level.

When user clicks on American Deluxe Stratocaster® V Neck then all relevant reviews should be listed.

Thanks in advance..


updated by @ilker: 04/07/15 11:37:21AM
brian
@brian
9 years ago
10,148 posts
How are the users entering the reviews? If it is by form (maybe something you created in Aparna) then you could use the Chained Select to build the options, although it is only going to go 3 "deep" - but I think you could be creative and do something like:

Electric Guitars -> Fender Stratocaster -> American Deluxe Stratocaster® V Neck

So then to show reviews for that specific model you'd just use that as a search option in your jrCore_list call.

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
sekeri
sekeri
@ilker
9 years ago
334 posts
I think using Chained Select and creating a new Aparna module for accepting reviews will be the best option.

But my main problem is on how to create a similar structure like this while showing reviews;
http://www.ultimate-guitar.com/reviews/electric_guitars/

The pages must be dynamic and urls has to be build accordingly. For example;

http://www.mysite.com/reviews/electric_guitars/
http://www.mysite.com/reviews/electric_guitars/fender/
http://www.mysite.com/reviews/electric_guitars/fender/strat/
http://www.mysite.com/reviews/electric_guitars/fender/strat/review1
http://www.mysite.com/reviews/electric_guitars/fender/strat/review2

I think you should seriously consider building a standard Reviews module :)
sekeri
sekeri
@ilker
9 years ago
334 posts
brian:
So then to show reviews for that specific model you'd just use that as a search option in your jrCore_list call.

Let me know if that helps.

Brian, do you have more specific examples on how to use search option in jrCore_list dynamically for this purpose. It is not possible for me to create static pages for each guitar model and list guitar models using the search option. Am I missing something here?
brian
@brian
9 years ago
10,148 posts
So basically:

http://www.mysite.com/reviews/electric_guitars/fender/strat/review2

"reviews" - this would be the Aparna module URL
"electric_guitars" this would be $_post.option
"fender - would be $_post._1
"review2" - would be $_post_2

That would not work well that way - you need to have an ID in there - i.e.

http://www.mysite.com/reviews/15/electric_guitars/fender/strat/review2

Which is going to uniquely identify that review AND would make the module much easier - all you do is create a "default" view in your module index.php file - i.e.:

view_myModuleName_default($_post, $_user, $_conf)

And inside that function you would run a jrCore_db_get_item for $_post.option - i.e.

view_myModuleName_default($_post, $_user, $_conf)
{
    $_rt = jrCore_db_get_item('myModuleName', $_post.option);
    // now $_rt contains the review
    return jrCore_parse_template('review.tpl', $_rt, 'myModuleName');
}

Create a template called "review.tpl" in your myModuleName/templates directory and style it to meet your needs.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags