4/24/2010

ModuleMaster, an admin module that was really missing from DNN

ModuleMaster is what I was looking for (and often considered developing myself). It can link modules – along with their settings – on the pages of your choice. Simple as that, but DNN doesn’t give you this option – you can either mark a module as “displayed in all pages”, in which case you only have linked modules to your original one – meaning that if you change something in one, it’ll change in every linked module, or copy the module by hand and then apply settings by hand (IPortable is not always well-implemented).

 

This module is a time-saver, especially for sites that have a number of pages already developed (and more especially if you’re using templates to create new pages). Imagine the scenario where the client asks you to apply a new text/html module, for example, in about 500 pages that you have already created, demanding to be able to edit each one of them independently of the others and needing to use a specific container. Count the DAYS it’ll take you to do it by hand. EDIT: Unfortunately, as I realised later, the module just creates “shadow” copies – i.e., links and not new instances, but remains useful whatsoever.

 

If anybody tries it, please post a comment here. I haven’t tried it yet, but looks very promising and it already has a couple of good reviews on SnowCovered.

Read more...

3/26/2010

Using page titles instead of names on the DNN breadcrumb skinobject

Simple, but useful. A fellow developer needed to use the page title (and not the page name which is the default) on the breadcrumb skinobject of his skin. The reason was that his menu had limited real estate so he had to keep names short, but he needed to give more information on the navigation breadcrumb.

 

The solution is just so simple! In your skin’s .ascx file, you’ll see a definition like the following:

 

<dnn:BREADCRUMB runat="server" id="dnnBREADCRUMB"  CssClass="Breadcrumb" RootLevel="0" Separator="&nbsp;>&nbsp;" />

 

If you add the following attribute:

UseTitle="True"

 

You’ll have something like this:

<dnn:BREADCRUMB runat="server" id="dnnBREADCRUMB"  CssClass="Breadcrumb" RootLevel="0" Separator="&nbsp;>&nbsp;" UseTitle="True" />

 

And then your breadcrumb will be using page titles instead of names.

 

Enjoy.

Read more...

Quick snippet: Show first n characters of a string without cutting words in half with OWS

Just a quickie for those of you who use the free Open Web Studio DNN RAD environment: I needed to show only the first n characters of a string that I got via a query in OWS, but wanted to “stop” display at the end of a word, (that is, not being very strict on the n character limit).

 

If our field is, for example, called “description” and the character limit is, let’s say, 100, and we need to insert three dots (…) after the end of the string if it’s only part of the original, here’s the function (be sure to write it on a single line):

 

{IIF, "[FORMAT,"[description]", {LENGTH}]>100", "[FORMAT,"[description]", {LEFT:[FORMAT,"[FORMAT, "[description]", {LEFT:100}]",{LASTINDEXOF: }]}]...","[description]"}

 

Change the field name, the number of characters and the three dots at the end to whatever suits you.

 

Of course there are several ways to achieve that via your SQL query itself, but that’s a quick way to do it in OWS if you can’t modify the query (when you’re using a view that is used somewhere else, for example).

 

Enjoy.

Read more...

3/15/2010

Free search/replace admin module from Engage Software

f3 This one is cute. It,s called Engage F3 and it lets you search and replace text in Text/Html and Engage Publish modules, site-wide. It’s intended for admin use only.

 

You can download it for free from Snowcovered.

Read more...

2/25/2010

Free HTML Template Repeater module – TEXT/HTML replacement

A simple idea, but someone had to conceive it and develop it. We often need to repeat a template made for a text/html module, without necessarily having the data stored in the database. Moreover, we need to give editors an easy way to enter data without having to know HTML to edit the markup.

 

There already are solutions, like Open Web Studio (formerly Listx) and the core Form and List module (formerly User Defined Table) module which can achieve similar results, but in a more complex and time-consuming way for the developer when it comes to simple, non-database-bound implementations like the one described above.

 

Enter HTML Template Repeater, created by Software’s Edge. You can define a template just as you would normally do in a Text/HTML module, defining placeholders for “variables” that you need to be replaced when the module output is rendered. The module provides you with a form to create “records” based on those variables and then you can repeat your template for as many records as you have entered. It even has paging functionality!

 

You can download the module from Codeplex, or see a video tutorial here. Another blog post / tutorial on the module is here.

Read more...

ERD Data Model and Meta Data Dictionary for DNN CE 5.2.2

Mr. Chodnicki from R2integrated has created a very useful data model and meta data dictionary for DotNetNuke Community Edition 5.2.2, which you can download by clicking here.

Read more...

8/30/2009

Displaying a “no search results” message when no search results are found

In earlier (4.x) DNN versions, when you make a search and it yields no results you are presented with an empty search results page – without any message. It’s silly, but nobody ever included this as a feature.

 

Thanks to this post, I found a way to include a “no search results” message. Or course, there are plenty of ways to do that, but I think this is the fastest. You’ll have to edit the admin/search/searchresults.ascx file as follows:

 

First, find this line and add what’s written in big, bold letters:

 

<asp:HyperLink id=”lnkTitle” runat=”server” Name=”result” CssClass=”SubHead” NavigateUrl=’<%# FormatURL(DataBinder.Eval(Container.DataItem,”TabId”),
DataBinder.Eval(Container.DataItem,”Guid”)) %>’ Text=’<%# DataBinder.Eval(Container.DataItem, “Title”) %>’>
</asp:HyperLink>

 

Then add the following code directly under the last line of the file:

 

<div id=”NoResults”>
<h3 class=”red” style=”text-align:center”>No Search Results Found</h3>
</div>
<script language =”Javascript”>
var search;
search = document.getElementsByName(”result”);

if (search.length == 0) {
document.getElementById(”NoResults”).style.display=’block’;
}
else {
document.getElementById(”NoResults”).style.display=’none’; 
}
</script>

 

Change the “No Search Results Found” string to whatever you like and you’ll have your “no results” message when your search yields nothing. Of course, you can also change the h3 tag with whatever you like, even include an image.

 

I don’t know what’s going on with 5.x versions since I haven’t tried it yet in one, but I think it’s still an interesting tweak for 4.x versions.

 

EDIT: This may not work if you leave the single and double quotes as they are in the code above. Better paste the code to Notepad first. Sorry about that, but I didn’t have the time to replace. (Live Writer can be very unfriendly sometimes :) )

Read more...
Related Posts with Thumbnails

Recent Comments

Free DotNetNuke Stuff

Free DotNet Videos

  © Blogger template The Professional Template by Ourblogtemplates.com 2008

Back to TOP