i want to use the active "tab"-name or page name inside my DNN Skin.
I can't find anything on the web about it (which is slightly odd). I'm looking for a control or sth. which i could use inside my ascx-file.
I don't think that there is a built-in skin object for displaying the name of the page. You can use this snippet in your skin to get the page's name:
<%= Server.HtmlEncode(PortalSettings.ActiveTab.TabName) %>
You can also get the page's title (the text displayed in the browser window title) via
<%= Server.HtmlEncode(PortalSettings.ActiveTab.Title) %>
Related
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 would like to get the userID of the current logged on user in DotNetNuke on a custom module. It's important not to use any functions from the code behind. Any ideas?
If your ASCX File inherits from PortalModuleBase (or a class that ultimately inherits from that) you can use something like
<%= UserId %>
That will spit it out on the page.
edit: updated to include the right code
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']); ?>
I have a content type called Realisation.
Realisation
Title
Body
Thumb Image
I create a Block View and a Page View
Page View
I display only Title, and the Body.
I setup the path url parameter as "/MyRealisation"
In the block view
I only show a list of Thumb Image.
I link my Thumb Image with the content.
When I click on my image, it's not using my custom Page View.
I Notice that the path is wrong. It show node/62 instead of /MyRealisation/node/62
Is there any reason ?.
Thanks a lot.
If you want have url each nodes like so site.com/MyRealisation/node/62
You need install module pathauto
Next you need go to admin/config/search/path/patterns and from this page write your templates for any node types
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.