How to align Html module title to right in DotNetNuke? - dotnetnuke

I am developing a multilingual website (Arabic,English) using DotNetNuke last version and i have enabled the site localization so there are tow icons in the top of page , in the Html module i can align the content of the module to right using the editor , but the title still on the left , so how to align the title to the right? , i think i should edit the css files (default.css , container.css) but these files used by the English version also .
so What is the best solution to align the title to the right ?
thanks.

Radi, I haven't done multilanguage with right to left languages before. But here is something to look into. Typically in DNN when you switch between languages there are some new URL parameters or DNN variables available. In your skin you could do a check on language and include an extra CSS file that loads only for right to left languages and then in that CSS file do the alignment. Probably a better way, but that should work.

Related

How to wrap text around an image in Wagtail

The Wagtail documentation on Inserting images and videos in a page explicitly states
Half-width left/right aligned: Inserts the image at half the width of the text area. If inserted in a block of text, the text will wrap around the image
How does one implement this?
I have created a page with an Rich Text block and inserted an image in the text (left aligned)
When I publish the page it is not wrapped
What can I do to fix this in Wagtail without the need for an html/css solution?
You need to add a CSS rule such as img.left {float: left}. As per the developer docs on images embedded in rich text:
The CSS classes added to images do not come with any accompanying stylesheets, or inline styles. e.g. the left class will do nothing, by default. The developer is expected to add these classes to their front end CSS files, to define exactly what they want left, right or full-width to mean.
In general, Wagtail leaves front-end styling up to the developer. This detail isn't covered in the page of documentation you looked at because that's part of the editor's manual, intended to be given to non-technical users after the development side is complete.

How do I configure the Font Icon Picker in 2sxc with FontAwesome 5?

DNN 9.3.1
2sxc 10.25.2
I added a field in a 2sxc content module called "Icon" and made it a Font Icon Picker. My DNN skin has FontAwesome 5 loading via CDN in CSS.
Looking through the 2sxc font icon picker field settings it expects the CSS Prefix, the Preview CSS Classes, and the Files for the fonts. (I get my FontAwesome 5 icons from CDN but I understand that I need to reference them locally - so I downloaded Font Awesome 5 and uploaded it to my server and reference it there).
But Font Awesome 5 (Free) has 3 different prefix classes for fonts: fab, far, and fas. (brands, regular, and solid).
So when I use the picker to choose an icon, it doesn't prefix the icon correctly. I would expect that when I choose the icon, it adds the correct prefixes like "fas fa-user" but it only outputs "fa-user" so the icon doesn't appear.
My razor template looks like this:
<i class="#Content.IconPicker"></i>
Am I setting this up incorrectly or does 2sxc Icon Picker not able to support Font Awesome 5? How can I configure the settings to get Font Awesome 5 to work?
this is indeed tricky. Let me give some background:
Fontawesome has different font files and different css files for targeting the icons
Unfortunately this causes trouble in the picker, because the picker cannot be configured to show icon previews with different prefixes - so as of now, the picker usually can only be configured to show one set of these icons
The same problem arises with the output as you noticed - in some cases a different prefix would be important, but the picker doesn't give you the prefix, just the icon name
We also had another problem that really bugged us: these icon-fonts really hurt our google page speed rating - ca. 10-20 points depending on the scenario! Because of this, we spent almost 2 weeks to find a better solution. And we have found it :). It's just not well standardized / documented :(.
Here's how it works:
basically all icons have different names anyhow, so the prefix wouldn't matter. This was just an optimization introduced by font-awesome, but it's not good anyhow.
So we need to have a css file which lists all icons, but just correctly uses the right font-file no matter what prefix is used. We can generate such a file and already have some working scripts that do it, but it's not in a state we could share :(
This css file should then be used in the icon picker
And in the page, because then the prefix doesn't matter
That's how we're solving it. Sorry that it's not simpler.
We're going a step further: if you have the commercial license of font-awesome, you can use a JS loader in your page which doesn't use the fonts at all, but just gets the 3-4 SVGs you're actually including in the page. That gives us the extra 10-20 points on PageSpeed! But because it's commercial license only, I can't share this with the public. If you do have the commercial license though, that's the way I would go.

How to make and use different page layouts?

I am new to DotNetNuke and come from a WP/Drupal background. I can't find any documentation on what I feel should just be a simple thing to do.
I need to have three different layouts, a Homepage layout which just uses a simple 12 column gird.
An InteriorA page where it uses a 9 col grid with a 3 col
Then an InteriorB page where it uses a 3-3-6-12 grid.
I dont see where I build and save these templates in code, then where to assign them to the pages I want to use them on.
Following up on the previous answer, resources available to you include the Xcillion theme that is provided with DNN installs. You will find the entire skin in /Portals/_defauilt/skins/Xcillion.
The "page layouts" are the .ascx files. The details of the layout are the "content panes" included in the .ascx files. They are the divs with IDs and the runat-server attribute.
You can define the layouts using different skin files, and then put content (modules) in the content panes that you would like to use. In other words, you can include the 3 layout possibilities in one .ascx, and place content appropriately.
The DNN Wiki has http://www.dnnsoftware.com/wiki/dotnetnuke-skins, with covers the basics of theming. You should be able to find more resources by Googling. One great resource on theme construction is DNN Hero's tutorials from DNN Creating. Start at dnnhero.com. This is a subscription service, though.
The location of these file is usually in a folder such as below:
\Portals_default\Skins
There are also skins which may be installed on a "portal" level:
These would be seen here:
\Portals\0\Skins
In here you should find a folder which is the name of the skin - And then the ASCX files for each individual skin file.

how to change DNN 7 Mega2DNN to Standard DNN menu

I has some problem, can anyone help?
how to change DNN 7 Mega2DNN to Standard DNN menu.
so it is one column going down
Thanks
The DDR Menu uses templates to conteol its behavior. Mega2DNN is one such template?
Assuming that the template is specified in your skin file, that's where you replace Mega2DNN with another template. Look at a skin file from the Gravity skin as an exmaple.
You will find a small collection of templates at http://dnnddrmenutemplates.codeplex.com/
The DNN Wike has a section on the DDR Menu, including a discussion of creating and configuring templates.
You may find it easy to modify an existing template, or you can create one from scratch. As for getting started, the ULTokens template creates a simple unordered list of links that you can style. The Superfish template creates a horizontal menu with dropdowns.
DNNCreative.com, a subscription site, has a nice tutorial

Image popup wrapper/module for DNN

I'm using DNN 5 for a hobby site. I know asp.net development, but have never written a DNN module.
The site is basically a project log. I want content areas that combine text and image thumbnails in a page, like a set of instructions. When a user clicks a thumbnail, display a popup div containing a larger image modal like on a lot of sites these days. Basically I'm looking to wrap each image in functionality like provided by highslide JS, but I can't figure out the right way to implement highslide JS in DNN.
I'm not averse to buying a module that does this for me, but everything I've found is more gallery based. The main difference is I want to control individual images that are among/next to the text, not a set of of images for users to scroll through.
I figure this can't be too crazy an idea, someone must have done it before. Any tips on good approaches would be appreciated. I'm tempted just to go edit source, but that makes upgrading a pain...
Thanks!
If anyone else is looking for this functionality, there's a project on Codeplex which looks pretty good at least as a gallery for DNN. It implements the highslide type popups well.
http://wnslightbox.codeplex.com/documentation

Resources