I'm working on a store with a small amount of categories and for the purpose of tayloring the drop down menu li's with bg images and descriptions, I want to markup the top.phtml manually.
After searching high and low I'm posting here to know if anyone can point me in the right direction for adding active class to the current category/parent category?
Much obliged,
Peter
There are a couple options here.
#1, You can let the menu render itself and then do string finds and replaces to mark it up better.
#2, You can compare the requested url to category url fragments to determine which ones are active.
I've used a combination of the two to create menus with CMS pages and certain categories with different CSS classes etc.
Related
I want to load all categories grids on one page and want all products to be available on scroll down. currently I need to click on each category and the page refreshes for each category. This is the site I am working on(ahmad.esy.es). I want this type of functionality upon clicking the category(http://www.just-eat.co.uk/restaurants-hertsplaice-en11/menu#2254). kindly suggest me what changes should I make in view files (product.tpl, category.tpl) or controller files(product.php, category.php). how can I load all the grids of categories in one page
I didn't look at the site you have posted above - if you cannot describe your issue by words or by submitting a code or image it should be improved.
From what I understand you just want an infinite scroll to display all the products you have in your eshop. It is not mentioned whether you want to preserve the default functionality (category tree with products attached to certain categories) or whether you want only this one listing - basically it does not matter - so I will describe in short how to add such new functionality.
The model
you do not need to touch any model - you can reuse the method ModelCatalogProduct::getProducts()
this will give you the possibility to sort or filter the products except you will have to omit the filter_category_id to load all the products
The controller
feel free to create a new controller (e.g. ControllerProductInfinite) or just to reuse one of the already existing - either ControllerProductCategory or ControllerProductProduct
all you need is basically the same as in ControllerProductCategory::index() except adding filter_category_id into a array passed when calling ModelCatalogProduct::getProducts() and a new template for rendering
The template
create a new template that will meet your expectations and infinite scroll requirements
stick to any infinite scroll plugin/implementation you like (may Google be with you)
I'm having trouble creating a menu with multiple choices and I'm hoping this great forum can help.
The webpage in question is:
http://rrg.genesis-unlimited.com/solutions/?categories=Adventure%20Park&level=1&format=video
The site is being built in wordpress using the catalyst theme framework which is very similar to Genesis.
I'm using the "views" plugin to create multiple areas.
First you have your main section where you choose the main category, in this case:
Adventure Park
Arborist / Tree Climbing
etc..
there are 7 main categories.
Then there are 3 subcategories: "Beginner, Intermediate, advanced"
Each category / sub-category choice has it's own page.
For instance "Adventure Park - Beginner" has a different page than "Adventure Park - intermediate" and so does "Arborist / Tree Climbing - Beginner".
The content of each page will also have 3 sections for video, articles and FAQ's.
There are basically 28 pages in all with each one having it's own content. This is a big undertaking.
My dilemma is that I would like to allow this choice without the use of a drop down menu.
I'd like the user to be able to click on the first level choice and then the second level choice which will be displayed below it.
Here's a screen shot of what I want it to look like, hopefully the visual helps:
http://rrg.genesis-unlimited.com/wp-content/uploads/2014/07/ishot-1.jpg
So you can see where you can click on the top level category and then choose the second level "view".
Anyone have any ideas on how I could accomplish this using wordpress?
Try to search for plugins,if you dont find anyone then if you know css go and change the css file
I have a website which I have taken over and I am new to drupal & PHP.
Basically there is a content filter on one of the pages --- When you select a term from the drop down list, it filters all the content which that term is grouped in.
I am trying to figure out how to add all my Parent terms into the drop down list, so that when a user select a term, it filters all the content within that term.
Currently there are only 4 in the menu, and I have a total of 13 in my Taxonomy.
you can see it live in action here http://www.buymondo.co.za/devices/phones
the list drop-down is on the right-hand side with a heading of MANUFACTURER
any help would be appreciated
Thank You
There is a View named "Devices" in your Views UI. You can see it in your Admin Dashboard.
You have to edit this view and click in the filter section.
I dont know whats the name of your vocabulary, but I sure you can change the depth of the terms to show. I think that you are displaying only the last depth.
I also dont know whats the structure of your vocabulary, but normally you have more than 1 level.
I hope this information has useful.
Regards.
I'm building a blog where three people will be writing, but they will have a separate section on the site. The structure is built upon categories and looks like this:
User one
Clothes
Fashion
Life
User two
Family
Life
User three
Family
Friends
Life
I've set all three users as writers and used the plugin Restrict Categories in order to lock their categories to the sub-categories the matching each top level category.
Now here comes the question, if I visit http://site.example/category/user-one/ I want to have a listing of all the posts, including the sub-categories since there will be no actual content in the top level category that you are browsing.
I've tried making this using filters bound to pre_get_posts but I still can't get it to work. Does anyone else here have any ideas?
I've also given some though into actually creating a multisite network for the purpose, but I then realized it will be hard to fetch posts from all the networks at once.
Thanks in advance, Jonathan
#Jonathan: Not sure if I am misinterpreting what you are hoping to achieve, but given that each author will already have their own 'author' page which lists all their posts (if your theme includes this or something you could create or customise), there may not really be a need for Users 1-3 to be their own category?
Going back to your question, for listing subcategories, perhaps https://wordpress.stackexchange.com/questions/13485/list-all-subcategories-from-category might be of some help.
As for listing posts, to keep things simple, I reckon you might be able to use e.g. get_posts (http://codex.wordpress.org/Template_Tags/get_posts) and build custom arguments, perhaps in a loop if you prefer to use one instead of slug/id specific category templates.
http://codex.wordpress.org/Category_Templates
If it's any help, Bainternet actually created a plugin that makes life a little easier to define category templates: http://wordpress.org/plugins/custom-category-template/
I'm new to Drupal and have a basic question which I cannot find a good answer to. I am trying to dynamicly determine the contents of my website based on a selection made by the user and keep the selection displayed in the routing for SEO purposes.
It's a website for a Restaurant with multiple franchises.
What i'm trying to do is the following:
The user visits my website and gets a splash screen presented with the available franchises or a textbox to enter his postalcode
Upon selecting he enters the main website with the navigational structure adapted to the selected franchise. For example: domain.com/city/, domain.com/city/menu, domain.com/city/menu/dishes, domain.com/city/contact, ...
The contents of all nodes are based upon the city the user selected. Some franchises have extra nodes which should be displayed in the main navigation aswell.
What I have thought about so far is to try to accomplish this with taxonomy but I really have no idea where to start. Parts of the nodes will be the same for all franchises other parts will be different. Menu item prices will also be different.
This is the first website i'm building using Drupal so any advice is welcome.
Thanks!
It will be impossible to explain it all here but yes it is possible to select your content based on user input in Drupal. You will need to look into Views & Panels.
In Views you can use arguments to narrow to a specific taxonomy. With Panels , an argument can be retrieved fron the URL and passed to the Views in order to display the results.
There are a lot of resources available, Merlin of Chaos, the author of the Views & Panels modules has written a book about it. There are video tutorials online. Your best bet is to start with drupal.org.