Skip to main content
added 269 characters in body
Source Link
Rajeev K Tomy
  • 17.3k
  • 6
  • 63
  • 103

You need to include layered navigation twice. Based on the comments, I have a strong feeling that, both of those layered navigation holds same content (more specifically holds same filters). If that is the case, there is no problem to use catalog/layer_view block twice in your layout. But you may probably need to use two templates for both of the blocks in order to do necessary changes. That is, second layered navigation filter should define like this in your layout file

 <block type="catalog/layer_view" name="mobile.layer.view" template="custom/template.phtml" />

Now in the custom template file, custom/template.phtml, you need to copy the current content that comes inside the default layer view template file app/design/frontend/<package>/<theme>/template/catalog/layer/view.phtml plus required changes. Most probably this "change" is addition of a script that will hide the whole content of the template from views other than mobile views and shows the content of the custom template only when it is a mobile view.

In short in this approach, we are using the second layer view block only in the case of mobile view. For rest view it will not shown in frontend. Adding a simple script inside the custom template will do the trick. This will let you avoid un-necessary rewrites

You need to include layered navigation twice. Based on the comments, I have a strong feeling that, both of those layered navigation holds same content (more specifically holds same filters). If that is the case, there is no problem to use catalog/layer_view block twice in your layout. But you may probably need to use two templates for both of the blocks in order to do necessary changes. That is, second layered navigation filter should define like this in your layout file

 <block type="catalog/layer_view" name="mobile.layer.view" template="custom/template.phtml" />

Now in the custom template file, custom/template.phtml, you need to copy the current content that comes inside the default layer view template file app/design/frontend/<package>/<theme>/template/catalog/layer/view.phtml plus required changes. Most probably this "change" is addition of a script that will hide the whole content of the template from views other than mobile views and shows the content of the custom template only when it is a mobile view.

You need to include layered navigation twice. Based on the comments, I have a strong feeling that, both of those layered navigation holds same content (more specifically holds same filters). If that is the case, there is no problem to use catalog/layer_view block twice in your layout. But you may probably need to use two templates for both of the blocks in order to do necessary changes. That is, second layered navigation filter should define like this in your layout file

 <block type="catalog/layer_view" name="mobile.layer.view" template="custom/template.phtml" />

Now in the custom template file, custom/template.phtml, you need to copy the current content that comes inside the default layer view template file app/design/frontend/<package>/<theme>/template/catalog/layer/view.phtml plus required changes. Most probably this "change" is addition of a script that will hide the whole content of the template from views other than mobile views and shows the content of the custom template only when it is a mobile view.

In short in this approach, we are using the second layer view block only in the case of mobile view. For rest view it will not shown in frontend. Adding a simple script inside the custom template will do the trick. This will let you avoid un-necessary rewrites

Source Link
Rajeev K Tomy
  • 17.3k
  • 6
  • 63
  • 103

You need to include layered navigation twice. Based on the comments, I have a strong feeling that, both of those layered navigation holds same content (more specifically holds same filters). If that is the case, there is no problem to use catalog/layer_view block twice in your layout. But you may probably need to use two templates for both of the blocks in order to do necessary changes. That is, second layered navigation filter should define like this in your layout file

 <block type="catalog/layer_view" name="mobile.layer.view" template="custom/template.phtml" />

Now in the custom template file, custom/template.phtml, you need to copy the current content that comes inside the default layer view template file app/design/frontend/<package>/<theme>/template/catalog/layer/view.phtml plus required changes. Most probably this "change" is addition of a script that will hide the whole content of the template from views other than mobile views and shows the content of the custom template only when it is a mobile view.