Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2013-03-08 10:45:21
- gour
- Member
- From: Hlapičina, Croatia
- Registered: 2013-01-17
- Posts: 124
(sub)category-based (sub)menus for static page
Hello!
I’ve a section called ‘archive’ which is at the moment static page with the list of audio mp3 files available for download, but I’d like to create menu entries and appropriate static pages for each file’s (sub)category in order to not have one big cluttered static file, iow. something like:
archive --> category1 --> subcategory1 --> static_page_with_the_list_of_audio_files_belonging_to_subcategory1
archive --> category1 --> subcategory2 --> static_page_with_the_list_of_audio_files_belonging_to_subcategory2
archive --> category1 --> subcategory3 --> static_page_with_the_list_of_audio_files_belonging_to_subcategory3
archive --> category2 --> static_page_with_the_list_of_audio_files_belonging_to_category2
archive -->category3 --> subcategory1 --> static_page_with_the_list_of_audio_files_belonging_to_subcategory1
Some files are atm sorted only in categories (e.g. category2 above) not having (yet) subcategory classification
My question is what is your recommendation how to do it?
I’m looking at adi_menu & adi_cat_menu plugins, but it seems they’re article-based and not sure whether they would work for file-based categorization ‘cause we only need nested menus for categories and displaying files instead of articles.
Any hint?
Offline
#2 2013-03-08 11:26:29
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: (sub)category-based (sub)menus for static page
Have a look at this TXP Tip, it may provide a starting point.
Offline
#3 2013-03-08 11:55:42
- gour
- Member
- From: Hlapičina, Croatia
- Registered: 2013-01-17
- Posts: 124
Re: (sub)category-based (sub)menus for static page
Els wrote:
Have a look at this TXP Tip, it may provide a starting point.
Thank you. That’s interesting, although I believe the more relevant part in my case is category-based (sub)menus.
Last edited by gour (2013-03-08 13:22:24)
Offline
#4 2013-03-08 18:03:32
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: (sub)category-based (sub)menus for static page
If you need help with customising it, just post back here :)
Offline
#5 2013-03-14 07:36:00
- gour
- Member
- From: Hlapičina, Croatia
- Registered: 2013-01-17
- Posts: 124
Re: (sub)category-based (sub)menus for static page
Els wrote:
If you need help with customising it, just post back here :)
OK.
After some research, I concluded that the best option for now until I deploy creating new theme (that would be my next Txp phase) using some framework like Foundation which already provides dropdown menus, is to use adi_menu and jQuery Superfish plugin.
So, when I deploy just adi_menu plugin, I (probably) get expected result.
When I activate Superfish plugin I get correct behavior but it only works if I select ‘Home’ page and if I go to some other section and hover over ‘Archive’, the menu display, somehow, fallback to the behavior when Superfish plugin is not activated.
Here are some of the relevant code snippets:
<!-- superfish -->
<link rel="stylesheet" media="screen" href="css/superfish.css">
<script src="js/hoverIntent.js"></script>
<script src="js/superfish.js"></script>
<script>
$(document).ready(function(){
$("ul.section_list").superfish();
});
</script>
<!-- end superfish -->
<!-- navigation -->
<nav role="navigation">
<txp:adi_menu class="section_list" active_class="active" />
</nav>
Any idea why the plugin does work only for ‘Home’ section?
Offline
#6 2013-03-14 08:24:03
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: (sub)category-based (sub)menus for static page
Try changing href="css/superfish.css"
to href="/css/superfish.css"
, and src="js/hoverIntent.js"
to src="/js/hoverIntent.js"
.
Last edited by els (2013-03-14 08:24:55)
Offline
Re: (sub)category-based (sub)menus for static page
Hi Gour,
Do keep in mind that superfish and any other method which relies on the “hover” attribute are not compatible with mobile devices.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#8 2013-03-14 12:36:27
- gour
- Member
- From: Hlapičina, Croatia
- Registered: 2013-01-17
- Posts: 124
Re: (sub)category-based (sub)menus for static page
Els wrote:
Try changing
href="css/superfish.css"
tohref="/css/superfish.css"
, andsrc="js/hoverIntent.js"
tosrc="/js/hoverIntent.js"
.
Thanks a lot ‘cause it works now and I learnt something new as well. :-D
Offline
#9 2013-03-14 12:40:05
- gour
- Member
- From: Hlapičina, Croatia
- Registered: 2013-01-17
- Posts: 124
Re: (sub)category-based (sub)menus for static page
I must say I’m really impressed how friendly is Txp community and so glad I’ve decided to use this CMS as my THE solution.
colak wrote:
Do keep in mind that superfish and any other method which relies on the “hover” attribute are not compatible with mobile devices.
Thank you for it. What do you recommend instead which is simple-enough? Does frameworks ala Foundation usually deploy something else to be mobile-friendly?
Offline
Re: (sub)category-based (sub)menus for static page
Although I never used any responsive frameworks, what I see from recent Jonathan’s sites Foundation might be a more appropriate contemporary solution.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: (sub)category-based (sub)menus for static page
Yes – Foundation and most of the new frameworks use CSS only solutions for mobile. So without knowing if Superfish has been updated recently I’d go with a framework for faster development.
Offline
#12 2013-03-14 15:12:20
- gour
- Member
- From: Hlapičina, Croatia
- Registered: 2013-01-17
- Posts: 124
Re: (sub)category-based (sub)menus for static page
jstubbs wrote:
Yes – Foundation and most of the new frameworks use CSS only solutions for mobile. So without knowing if Superfish has been updated recently I’d go with a framework for faster development.
Thanks colak and jstubbs. I was considering to use YAML along with Thinkin’Tags, but lack of such things makes it more complicate than using frameworks like Foundation.
Offline