Our navigation looks like this:
Item1 Item2 Item3
-Sub1 -Sub3 -Sub4
-Sub2 -Sub2 -Sub5
As you can see, Sub2 is repeated under Item1 and Item2.
On each page (Sub*), we have side navigation (added using Widget Layer Rules) that shows the entire navigation under the main-menu item. So, if you're on Sub1, you would see Sub1 and Sub2 on the side nav.
The problem is that we want to show the right side nav for Sub2 based on the menu item through which the user accesses the page. We could create a new Widget Layer based on the URL, but we would still need to be able to display the page at two different URLs. We don't want to replicate the page, since that wouldn't scale very well for maintaining these pages. Is there a way to display one content item at two URLs, or is this something that needs to be built custom?
If you go to the Modules page and enable the Alias UI feature, you can add aliases for routes within your application. This is probably what you are looking for.
Related
I'm familiar with SharePoint but would like some guidance on developing a custom page.
I have 1 list and have created 3 different views.
On my Page, I have added a webpart to show the list.
I'd like to be able to add some form items - possibly radio buttons/ a picker/ or just text links at the top that would allow the user to switch views on the list below.
I'd like to add some other information and make the experience more intuitive for the user.
In short, is there a way to add a list web part and some options to choose the view of that list in another section of the page?
Sure, just do something like this
var dview = MyList.Views["YourViewTitle"];
dview.DefaultView = true;
dview.Update();
MyList.Update();
Each view has its own URL so you just need to use some HTML and JavaScript. When a box is checked or a button is clicked then you can load the URL of the view.
I've got to implement navigation using a main menu (easy) but then each menu will lead to a group of pages that have another "submenu" which I've implemented as a menu widget in the before content area.
The main navigation is something like this:
Home | First Group | Some page | Another page | Second Group | Yet another page
When the user clicks Home, Some page, Yet another page, it is taken directly to that page.
If the user clicks any of the "groups" it is taken to the "default page" for that group, and a submenu which is implemented as a menu widget is shown in the before content area. The first group can have 5 pages
Page 1.1 | Page 1.2 | Page 1.3 | Page 1.4 | etc.
The Second Group will have another set of pages.
I've naively set the path properties for the subpages so that they share a common path:
/group-1/page-1-1
/group-1/page-1-2
/group-2/page-1-3
etc.
/group-2/page-2-1
/group-2/page-3-1
etc.
I was expecting to use the Match Path to hide one widget menu in under one path or the other. But the problem is that I can't target a specific Menu or Widget, only content types in general, etc. I can't do something like this:
<Match Path="/group-1/*" ContentType="Widget SOME WAY TO TARGET A SPECIFIC WIDGET!!!">
<!-- SEND THE NEEDED PARTS TO OBLIVION SO THAT ONLY THE CORRECT MENU SHOWS HERE --!>
<Place Parts_Common_Body="-" />
</Match>
I believe that it would be much better to use a layer rule to target a specific path, but I just can't match a layer rule to something like url("/group-1/*"), so that's why I've tried to use the placement info which seems to be the wrong tool.
Is there a way I can extend the layer rules to work with regular expressions, for example? This way I can create really powerful layers and just layout my widgets on the proper layers.
In summary what I want is to have different submenus for different sections of the site. I'm just kind of lost on how to accomplish that, but layer rule seem to be the right tool, only if I could manage to use a little more powerful matching syntax.
I think I'm kind of blind!!!
Straight from the docs:
url("<url path>")
True if the current URL matches the specified path. If you add an asterisk (*) to the end of the path, all pages found in subfolders
under that path will evaluate to true (for example, url("~/home*")).
So adding this rule was enough to create a layer for an entire section of the site:
url("~/group-1*")
I'm almost ashamed of myself...
I am currently working on an Orchard module. This module contains an MVC application including the views. I would like to make the module as configurable as possible. One of the items that I would like the customer to configure is the way the MVC views from the module look. Part of it will be determined by the theme. But not everything. Consider the following scenario:
The module contains a view for placing an order. The view displays a form in ´normal view way´. That is field labels and input labels. But at the head of the form each customer must be able to define his own set of instructions to display. Or maybe the customer wants to put there a message for pointing the customer to some other actions.
In the most ideal way I would have a content page where the customer can put all kind of content and one specific block that is the result of the view of the module. Kind like a web part. I can´t find out if it is possible and how that is achieved.
Edit for clarification
Module creates a page like this:
TITLE
FORM
So both title and form are outputted by the module controller.
I have managed to create a layer with the condition that the url matches the page with my form.
I have added a HTML widget to this layer in the content zone with position 1 (tried 0 to).
However the pages looks like this:
TITLE
FORM
WIDGET
instead of
WIDGET
TITLE
FORM
Returning a ShapeResult from your controller action will ensure that your view is themed and benefits from widgets, which are your "kind like a web part" thingies in Orchard.
I want to create a page in Drupal 6 where I can show list of restaurants.When a user clicks on any restaurant page, I should be redirected to Restaurant details page.
For this :
1.) I created a new content type called "Restaurant" with some fields.
2.) Created 3-4 content items for Restaurant( Restaurant1, Restaurant2, Restaurant3)
3.) Created view called: RestaurantList, Added Fields for it. Then added Page Display and gave the path for it http://website/Restaurants
Now, when I browse to Restaurants page, I only get labels of my fields but no values. How can I get the values but not the labels? Also, I want to go to the RestaurantDetails page. How can that be achieved?
Thanks,
Rashmi
Well if I were to set up a page view this is how I would set it up:
Filters:
Node type - Restaurants
Node published - Yes
Fields
Node title
check the option Link this field to it's node
leave the Label: field empty
check option Hide if empty
And if your view style is a HTML list, for extra you can go to Row style options and check the option: Hide empty fields
Make sure you click Preview to see if you get any values. If you don't then there's something wrong with the view settings, most probably the filters which are to restrictive. Start with something loose, like Node type - Restaurants.
Is there a way to "merge" 2 different views into one view?
i need to control how many of each content type are displayed
Just use the panels module. With panels you can define a page with different regions (you'll probably need two of these). The content of such a region may even be a view and you are able to restrict the shown entries of each view through the panel ui.
http://drupal.org/project/panels
You could create the second view as an attachment to the first view. This is likely the easiest way to go about it. The attached view can inherit any arguments used in the first view as well.