Joomla Override: can't seem to find upmost container - html

I want to override the Login module. I have created the override in the html folder, but I can't seem to find the upmost div with class="login" that is visible when viewing the original Login module with Firebug. I have searched all files in mod_login.
I want to place the following above the module:
<div class="item-page">
<div class="page-header">
<h2 itemprop="name">Login</h2>
</div>
</div>
Thanks in advance
EDIT: I'm using Joomla 3.4.6. Login_Module is in it's original state.

Based off the limited information provided...
You should only have to place the default.php file from /modules/mod_login/tmpl/ into /templates/[template_name]/html/mod_login/ to override the frontend module.
To modify the module for the administrator side, you would copy /administrator/modules/mod_loing/tmpl/default.php to /administrator/templates/[template_name]/html/mod_login/default.php
If the code you're trying to edit isn't in that file, then you may want to try looking at the com_users component which has the file: /components/com_users/views/login/tmpl/default_login.php and see if that's what you're looking for.

Related

Prevent Overlap for AEM Template Placeholder Empty Component

I am building an AEM component but it is overlapping with existing components on edit page
Here's the html file:
<sly data-sly-use.template="core/wcm/components/commons/v1/templates.html"></sly>
<sly data-sly-call="${template.placeholder # isEmpty=true}"></sly>
I have also tried the following code in the html file:
<sly>
<sly data-sly-test="${wcmmode.edit}">
<div class="cq-placeholder" data-emptytext="sample component"></div>
</sly>
</sly>
But both code result in the same situation, as you can see the below screenshot, the sample component is overlapping with the "Drag Component here":
Does anyone know how to fix this issue? Based on this tutorial I think I have followed everything: https://blogs.perficient.com/2017/08/06/aem-component-placeholders-the-wcm-core-component-way/

Navigating to a new page in angular not working

Im new to angular and i have created website using angular. When i Login it shows the username in the top of the page(shown below)
my requirement is, when i click it i want to take the user to another(for example user details page) But what i have done in my .html and .ts files doesnt do anything
The relevant html code part
<div class="m-2">
<i class="fa cursor-pointer" (click)="Navigatekbuttonclick($event)">{{username}}</i>
</div>
the relevant .ts part
Navigatekbuttonclick(){
this.router.navigate([/userdetails]);
}
Can anybody help on this navigation part please and tell me whats missing
The path you passing in parameters needs to be in quotation marks.
Try this:
Navigatekbuttonclick(){
this.router.navigate(['/userdetails']);
}
But in order for that to work, you must define the route in your router :
{path:'/userdetails', component: userDetailComponent}
Here's a link that can help you : Angular Documentation

Selenium cannot find the element loaded from embedded html

So I'm trying to hit this "Review Agreement" button:
which has the following html code:
<section class="col-33 text-right">
<button class="anchor-button bordered" ng-click="onClickReviewAgreement()">Review Agreement</button>
</section>
BUT apparently it's loaded from another resource, so findElement(By.*) doesn't work on it - I've also tried By.xpath("/html/body/ul/li[2]/notification-bar/ul/li/section[1]/section[2]/button")-. All the related code I'm getting in View Page Sources is:
<!-- Agreement form modal -->
<ui-modal
ui-modal-id="ui.modals.agreementFormModal"
ui-modal-class="takeover agreement"
ui-modal-controller="AgreementFormController"
ui-modal-template-url="paths.templates + '/components/forms/tpl.agreement-form.html'"
ui-modal-has-dimmer="true">
</ui-modal>
Is there any way I can select these kinds of elements?
You should be able to bind to ng-click="onClickReviewAgreement()" using css. It should be unique and css is a better and more efficient alternative to xpath
Try using css to find the element and click thereafter -
WebElement buttonElement = driver.findElement(By.cssSelector('[ng-click="onClickReviewAgreement()"]'));
buttonElement.click();

MVC 5 HTML custom helper with content

Is it possible to write a custom html helper that has some content it it's body, similar to BeginForm?
I want to write a helper that displays a section only if the user has a particular role.
Something like:
#Html.DisplayForRoles("User, manager")
{
<div>You're admin or manager</div>
<div>Other stuff</div>
}
Yes, yes it is.
What you want is to create an HTML helper extension, there's several good guides out there which I won't reproduce here, such as
http://www.asp.net/mvc/tutorials/older-versions/views/creating-custom-html-helpers-cs
or
http://www.codeproject.com/Tips/720515/Custom-HTML-Helper-for-MVC-Application
Or were you after more specific help?

How do you change/locate the default icon of the Authentication Login in DNN?

Here is the code when it's compile, but how would you locate it?
<div class="SteelBlue01_style">
<div class="SteelBlue01_top_bg">
<div id="c_head">
<div class="c_icon SteelBlue01_top_height">
<img id="dnn_ctr_dnnICON_imgIcon" src="/Icons/Sigma/Authentication_32X32_Standard.png" style="border-width:0px;" />
</div>
<div class="c_title SteelBlue01_top_height">
<span id="dnn_ctr_dnnTITLE_titleLabel" class="c_title_black">Account Login</span>
</div>
I don't know if this is configurable from the Admin area of DNN like the site logo. If it's not accessible, here is a way around it...
In the provided sample the default icon is at the path, /Icons/Sigma/Authentication_32X32_Standard.png.
If you want to change it, you could replace that file with another image file that has the same name. That way, when the default location used, it will be retrieving your file.
One warning about using this technique. Since you are replacing files put there during installation (either of DNN itself or of a module), if you update, there is the risk that your file will be overwritten with the one provided by DNN or the module. Be careful during updates. If you start to do replace core components, make sure you keep a list of your customizations so you can check them after updating.