I have some content for the front page of my site, but it will not display in the "Content" block region for my theme. All other pages display their node content fine. I have looked at the following to diagnose:
1) Moved the "Main Page Content" block to other regions to see if it will display anywhere at all. It does.
2) Checked permissions. My user is an admin, and admin has all permissions.
3) Altered other pages content to see if it changes. It does, it only seems to affect the front page.
4) When I make other pages the sites home page, it's content also disappears. Example: When I make the "About Us" page the sites home page, the content at '/' (supposed to be the About Us content node) is gone, and it also is gone from '/about-us'. Meanwhile, the page I have been trying to make my homepage previously, displays fine. So this problem only affects pages that have been made the home page.
5) There is not any sort of "Show block on specific pages" or otherwise, that would conditionally hide it.
All the other blocks in the "Main Page Content" region on the home page display fine. Clearing cache does not do anything. There are no panel node template overrides. I am really baffled. Googled for this, and no love.
Any ideas?
Please verify do you have following code on your theme?
<?php print render($page['content']); ?>
Related
I'm using ui-router.
A similar question has been asked on this a Number of times... But the solutions seem to be all over the place and either the question doesn't address a simple idea or the answer doesn't, either.
Here's my simple ui-view setup:
A master view has the navbar and footer
Children of the master view/route that can be activated include the Homepage, About Us page and Learn More page
Pretty simple...
By default, if the homepage is activated, and scrolled down 500px, and I click on a route to the "About Us" page, that page will be scrolled down 500px. Obviously this is not desired.
So... Everyone's solution is some variation of setting document.scrollTop(0) on every state change success. This is atrocious.
While it fixes the issue at hand, it clobbers the browser back button behavior. Here are some problems:
When a refresh is called, the standard browser behavior of refreshing to the current location is ruined
When the back button is clicked, the homepage would then scroll all the way to the top
If the back and forward button were clicked, I wouldn't retain the correct spot on the next page, either
This whole document.scrollTop(0) or any variation of it, really doesn't seem to be viable and I've yet to see a clear solution to this.
I have configured a JSR 286 portlet on my portal page which points to a content item. The content item has an expiry date. Once the content expires the user sees default warning message saying no content found for the selected site area.
I want this portlet should not be rendered if there is no content in the selected site area instead of showing a warning.
Use a Menu Component that is set to only display 1 item for your portlet. Then create a second content item that has a Presentation Template that just says something like this:
<div class="emptyPortlet" style="display:none;"> This is an empty template. </div>
*if you don't want to declare the style inside the tag, you could also specify .emptyPortlet { display: none;} inside your CSS file.
Publish this before your other item and then set the Menu Component to display based on Publish Date. This way, when you create another item that you want to display (which uses a different Presentation Template), it will have a more recent publish date and will be shown on the page. But, once that is expired, the only published item left to find will be this blank one, and with "display: none" it will essentially hide the entire portlet from the user.
You have a few options
Easiest would be to create a custom skin that shows or does not show depending on it's internal contents. just create your own skin to return nothing
Your other options include scraping it out of the response with a servlet filter or some other mechanism or stripping it from the page once you have started rendering
I have a really strange issue relating to how I handle navigation in an application, and that application now being rejected from AppHub (after being successfully approved a number of times on the same code base... grr)
currently I am capturing the first navigation of the application and routing it an "add item" page in the App.cs using the example found here
the user then adds an "item"
the user is taken to the "main" page again, but stay there are there is now 1 "item" to show in a list
the user then can view a "detail" page of this item where they can select to delete the current item. when they do that I redirect them to the "main" page again.
this navigation then fires the same thing that happened in step 1
and they are routed to an "add" page
the problem with the above process, is that if the user hits "back" on the routed page in step 5 they don't go anywhere as they are routed back to the current page (because there are no items on the page previous and this fires the app.cs routing event to take them to the add page). if I did allow for them to go back, the actual first page they would be able to go back to is 3 nav steps back, when they first added the item - as they are on the "add item" page already, this would be pointless.
The apphub store testers say that in this instance, the application should close. I really don't know how the f&*k I am meant to make this happen, as there is no "go back until close" action I can call...
thoughts?
When the user decides to "delete" the current item, you shouldn't navigate forward to the main page, leaving the deleted item in the navigation stack. You should navigate back to the main page. That way the navigation stack will be empty, and if they navigate back again, the app will close.
(The same is true at step 3, of course - when the item is added, navigate back to the main page. You don't want the "add" page as part of the navigation stack; that action has been completed.)
The single best advice I read on WP7 navigation was "if you don't have to, don't use it." I've almost stopped using it all together and just use "MainPage.xaml" for loading/unloading user controls that do this kind of stuff. I completely control the Back button as needed. It has saved me so much headache. The important thing to realize is that the Navigation pages are really just mimicking a website and it's pages - many apps do not fit that paradigm (as they are apps, not websites). So, if you don't have to use Navigation, don't use it.
So in your case, if you just managed everything on MainPage.xaml, you would use a number of If/Then statements in OnBackKeyPress and if one meets your criteria, do an e.Cancel = true; and show/load/etc. your thing. If not, let the app navigate out of itself - i.e. exit.
For tombstoning, just let the OnNavigatedTo in MainPage.xaml handle loading the right user control received from tombstoned information retrieved from Application_Activated.
I've created custom object and custom tab (label text="order").
Now my header looks like below just like everyone can do.
[home]__[customer]__[order]
And when I click on "order" tab, I am redirected to home page of "order"
The "order" homepage has:
view (which goes to search feature)
recent record
My question is how do I change the layout of this homepage? I've look though entire site and documentations but seems like it is not possible. The only option I have is to create brand new visualforce page and set that page as default homepage for the "order" tab.
No, you can't change the contents of a default tab homepage beyond the limited controls under Setup. You would have to create a new Visualforce page and replace the page all together; however, with an enhancedList, you can get the basics down without too much coding, like this:
<apex:page>
<apex:enhancedList type="Account" height="500" />
</apex:page>
This would just show the standard Account list views on the tab (which could have Recent Items), but you could spruce things up with other components or make the list view customized with a set controller.
Is there anyway to use the built-in DNN Menu module to display a menu based at a different root node other than the current tab node?
Given the following structure:
Page1
-child1_1
-child1_2
Page3
Page2(hidden)
-child2_1
-child2_2
In this scenario I will be having 2 menus on this skin. One will be normal navigation based off of the current node and the other will be a set of 'static' links to pages located outside the current node.
When on Page1 the normal navigation will show Page1, Page3 and the children of Page1 nested under Page1. The 'static' links will use 'Page2' as their root and will show child2_1 and child2_2.
In case anyone needs the answer to this, it is possible to do this using the dnn:NAV control:
<dnn:NAV runat="server" ID="dnnNAV" ProviderName="DNNMenuNavigationProvider" IndicateChildren="false" PopulateNodesFromClient="true" ControlOrientation="Horizontal" StartTabId="66" Level="Child" />
The StartTabId is the "root node" of the menu.
Level="Child" tells DNN to get the child tabs of the StartTabId. Use Level="Same" if you want to get tabs on the same level as the StartTabId.
I cannot understand your question at all. I don't know what you mean by "root node" or "tab node". I'm going to re-ask it based on what I think you mean and answer that question.
If you want to use the DNN menu to link to static pages, that's easy enough. To do this, Add a new Page (using Control Panel / Add). Complete the "Basic Settings" for the page, then under "Advanced Settings" the last option allows you to specify a URL, Page, or File for this page. You probably want "URL". Enter the URL and click "Update".
The menu item will now redirect to the link specified.