How to get name & link of parent page in DNN - dotnetnuke

I want to have a link on children pages that is not only the name of the parent page, but also links to the parent page in DNN.

Use this in your skin ascx file
<a href="<%= ((DotNetNuke.Entities.Tabs.TabInfo)PortalSettings.ActiveTab.BreadCrumbs[ PortalSettings.ActiveTab.Level - 1 ]).FullUrl %>">
<%= ((DotNetNuke.Entities.Tabs.TabInfo)PortalSettings.ActiveTab.BreadCrumbs[ PortalSettings.ActiveTab.Level - 1 ]).TabName %>
</a>
Note: this is for a C# skin.

Related

Links not working inside featherlight popup

I've built a site with Hugo and using featherlight.js for pop-up lightbox. All working fine when hosted locally. But on the live version I'm having a weird issue where the links inside the pop-up are not working.
A full reproducible example is difficult, but I'll provide the relevant code and perhaps someone can identify what's likely causing the problem or tell me what other info they need.
Relevant code calling featherlight:
<a class="search-icon" href="#" data-featherlight="{{ .link | safeURL }}" > <i class="ti-search"></i> </a>
Where .link is html file compiled from markdown.
If I navigate directly to .link the content shows up fine, and the links in the content are fine, e.g.,:
<p>See more here </p>
But inside the pop-up lightbox, links in the content appear like this:
<p>See more here</p>
i.e., 'here' is outside the </a> tag.
This particular link uses Hugo code:
<p> {{.Params.Link_text}} <a href="{{ .Params.Link | absURL }}" > here </a> </p>
But the same thing occurs for the links written with Markdown.
A featherlight.js bug or something else?
It works after replacing this "https://code.jquery.com/jquery-latest.js" with "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js".

DNN custom skin gives jquery missing error

Whenever I try to make a custom skin object in Admin/Skins folder or Admin/Containers folder, I get the error
Uncaught ReferenceError: jQuery is not defined
I'm trying to add a bootstrap link skin object to be used in the template. DNN Newbie here!
<%# Control Language="C#" AutoEventWireup="false" Inherits="DotNetNuke.UI.Skins.Skin" Codebehind="Button.ascx.cs" %>
<%# Register TagPrefix="dnn" Namespace="DotNetNuke.UI.WebControls" Assembly="DotNetNuke.WebControls" %>
<asp:button id="btnButton" runat="server" cssclass="Normal" enableviewstate="False" MouseOverCssClass="LabelEditOverClass"
ToolBarId="titleToolbar" LabelEditCssClass="LabelEditTextClass" EditEnabled="True" EventName="none" LostFocusSave="false"></asp:button>
<DNN:DNNToolBar id="titleToolbar" runat="server" CssClass="eipbackimg containerTitle" ReuseToolbar="true"
DefaultButtonCssClass="eipbuttonbackimg" DefaultButtonHoverCssClass="eipborderhover">
<DNN:DNNToolBarButton ControlAction="edit" ID="tbEdit2" ToolTip="Edit" CssClass="eipbutton_edit" runat="server"/>
<DNN:DNNToolBarButton ControlAction="save" ID="tbSave2" ToolTip="Update" CssClass="eipbutton_save" runat="server"/>
<DNN:DNNToolBarButton ControlAction="cancel" ID="tbCancel2" ToolTip="Cancel" CssClass="eipbutton_cancel" runat="server"/>
</DNN:DNNToolBar>
Edit:
I'm trying to create various skin objects like button, title tags, body tags, which take in our CSS styling. So the Marketing department can just drop it to a location, edit the text/link of the button or edit the text in title, etc.
Looking a bit further, DNN does NOT load jquery automatically. You need to set up your custom skin to load it.
See: https://www.dnnsoftware.com/wiki/client-resource-management-api
The short answer to your question is that you can do all of this using the user control DnnJsInclude. Note that there is also a DnnCssInclude control.
As I understand things (from the referenced item), these load the js and CSS files only if they have not yet been loaded.
If you are looking for a model for a DNN Theme, have a look at nvQuickTheme on GitHub.
Thanks to Will Strohl for pointing me in the right direction ...

How do you link to a external anchor link in angular?

Currently, I'm linking to a specific sections within my angular view page landing.html. I want to link to the same sections from my angular view page faq.html. Can someone assist me on how to accomplish this?
PS I'am using Angular 1.5.8
<ul>
<li class="dropdown navbar-user">
<a onclick="$('#innerScrollableContent').animate({ scrollTop: $('#engine').offset().top}, 'slow');">
</ul>
You can make a master view then add the common codes as you mentioned in the master html.
Then load the other pages into that view.
Or use ng-view to load these views to your page.
otherwise create a template and call that template in every page
as
<div ng-include src="template.url"></div>
Check the jsfiddle for implementing ng-include
http://jsfiddle.net/mrajcok/MfHa6/

Controller Scope Array not load updated data on another controller

i created one index page which have "NavigationController" and bind the menu on index page. when i redirect to new page controller and inject it "NavigationController" to bind latest menu on next page but it always display old menu. when i refresh the page then it loads nice with new menu.
<nav class="static-sidebar" role="navigation">
<ul ng-controller="NavigationController" id="sidebar" ng-init="!layoutLoading">
<li ng-repeat="item in menu" ng-include="'templates/nav_renderer.html'" ng-show="{{item.hasRights}}" ng-cloak></li>
</ul>
And Controller with my factory method which return meun is :
$scope.menu = GetHttpRequest.GetMenu();
Now, I Add into Another page i.e
<div ng-controller="NavigationController"></div>
but this not load latest menu untill i refresh the page
so , can you help me in this?
{{}} not needed in ng-show.
Use ng-show="item.hasRights" instead of ng-show="{{item.hasRights}}"
If it works after refreshing it means that it is something with loading order in your site. Check if you have correct order of loading, like: vendor lbirariers -> your libraries -> (...) -> your controller
also check your dependency injection headers in js files, cause you might skipped something

Joomla Article to open in a new page instead of home page

I am using joomla 3.5 and in my home page i added articles with read more option. Whenever i am clicking the read more option it opens in the home page but i want it to open in a new page instead of the home page. How to do so.
thanks is advance
This may require editing the core Joomla files of your site.
Go to components/com_content/views/category/tmpl/blog_item.php or whatever type it is and change:
<a href="<?php echo $link; ?>">
TO:
<a href="<?php echo $link; ?>" target="_blank">
You should also change it in components/com_content/views/featured/tmpl/default_item.php
Also you can try a menu item for the category the articles belong to. See this answer here
You can try editing the target window in the Menu Manager under details tab
in the options you can select 3 options
Parent
New Window with navigation
New window without navigation
you can try choosing the 2 options next to parent for it to redirect to a new page

Resources