Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListDisplaying "Add New Record" without displaying containerDisplaying "Add New Record" without displaying container
Previous
 
Next
New Post
1/21/2011 4:14 PM
 
Hello,

I am displaying a List using Form and List, and I want certain security roles to be able to add records to that list (without displaying the form to evryone – only certain users). However, I have noticed that if I do not display the Container around my Form and List module, the option to Add a Record (along with the module menu) disappears. It seems as though the "Add a Record" button is part of the container. I want to show the "Add a Record" button without displaying the Container.

Is there a way to add the "Add a Record" button to my custom XSLT file?

The only other workaround I can think of would be to create a very minimal custom Container for this module in particular, but I would rather not do that.
 
New Post
1/21/2011 7:48 PM
 
Usually, for this and other display-related reasons, the best route is to create and use a custom container that doesn't have any visual display elements.  Such a container is often called something like "blank" in the skin package.  These days, all skin packages usually come with such a container for this very reason.

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
1/21/2011 7:51 PM
 
You are right in assuming the add record button is part of the container - it is bound to one of the container actions.
So yes you would need to create a custom container for this module to get the Look you are aiming at.

Cheers

Wes

 
New Post
1/22/2011 5:10 AM
 
The "add new record" causes basically a link to ../tabid/TABID/ctl/Edit/mid/MODULEID/Default.aspx.

It can be even written in tokens as
<a href="/tabid/[Context:TabId]/ctl/Edit/mid/[Context:ModuleId]/Default.aspx">Add new record</a>

Now you want to show the add button only for users with "add" permission, though you can't query permissions within XSLT.
But look at the xml data, there is also a Context node, which gives you information about the current user (<UserRoles>|Registered Users|Subscribers|Editors|Administrators|All Users|Administrators|</UserRoles>)
Example code:
<xsl:if test="contains(//udt:Context/udt:UserRoles,'|Editors|')")>...</xsl:if>

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListDisplaying "Add New Record" without displaying containerDisplaying "Add New Record" without displaying container


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out