Buck Anderson - DNN Professor Member Login
September 10, 2010

Our Products  

Business Directory 6.1

from DNN Professor

View Details View Business Directory 6.1 Reviews

Easily add Business Directory listings to your DotNetNuke website! This, XMod powered DNN...

From: $97.00

Review IT!

from DNN Professor

View Details View Review IT! Reviews

Easily add Music, Movies, Products, Software, and Service Reviews to Your DotNetNuke website!...

From: $97.00

Move My Inventory!

from DNN Professor

View Details View Move My Inventory! Reviews

Get Results by presenting your product inventory and services in a unique and professional way...

Price: $97.00

ForumsDNN Professor Forums

DotNetNuke Forums | Xmod Forums | Internet Marketing Forums | DNN Professor Product Forums

Product Support and Product Forums Registration


Subject: Listing Template Modification
Prev Next
You are not authorized to post a reply.

Author Messages
johnfaUser is Offline

DNN Newbie
DNN Newbie
Posts:6
Send This Member a Private Message


 

cant see any display/ hide  logic here ?  is it something to do with the dnnpNormal class ?

thanks

John

 

 

04/19/2010 4:35 AM  

Hello there

I am wanting to extend the standard Listing template to include a new link to another form from the Edit / Delete area on a  listing.

I was wondering where the logic which determines whether to display the Edit / Delete icons exists - as it is restriced to the user who created the listing. ? All I can see in the template is





johnfaUser is Offline

DNN Newbie
DNN Newbie
Posts:6
Send This Member a Private Message

04/20/2010 5:54 AM  
Just to clarify - how can I add a new link to a custom form in the Edit / Delete / Approve section of the Listing template which abides by the same rules as these buttons - ie only appears for the user who created the listing.

I have tried adding a link but this displays for all users all the time which is not what I want

any ideas ?

thanks
johnfaUser is Offline

DNN Newbie
DNN Newbie
Posts:6
Send This Member a Private Message

04/20/2010 7:59 AM  
OK I have tried this

Current UserID= {XMOD_UserId}
Listing UserID =

this shows me the correct values

however when I try this in an IF statement it always returns (MATCHED) TRUE ?

can I use the {XMOD_UserId} in an IF statement ? can anyone tell me what is wrong with this ?


MATCHED

NO MATCH


johnfaUser is Offline

DNN Newbie
DNN Newbie
Posts:6
Send This Member a Private Message

04/20/2010 9:14 AM  
Have replaced <> tages with ()

Current UserID= {XMOD_UserId}
Listing UserID =(xmod:field name="UserID"/)

(xmod:if name="UserID" value= {XMOD_UserId} )
(span style="color:blue;")MATCHED(/span)
(else)
(span style="color:blue;")NO MATCH(/span)
(/else)
(/xmod:if)
Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:617

Send This Member a Private Message

04/21/2010 9:07 AM  

John,

First of all there is no field value for UserId so your logic will not find a match.

There is a XMod token for {XMod_UserId} however.

What you want to use is a xmod:select template tag to compare the current logged in user.

[xmod:select]

[case value="{XMOD_UserId}" operator="=" expression="3" comparetype="text"] [span style="color:blue;"]MATCHED 3[/span] [/case]

[case value="{XMOD_UserId}" operator="=" expression="2" comparetype="text"] [span style="color:blue;"]MATCHED 2[/span] [/case]

[case value="{XMOD_UserId}" operator="=" expression="1" comparetype="text"] [span style="color:blue;"]MATCHED 1[/span] [/case]

[else]No valid case statement found for {XMOD_UserId}.[/else]

[/xmod:select]


References

http://dnndev.com/help/xmod/Content/Template_Tags/_xmod_select_.htm


http://dnndev.com/help/xmod/Content/Form_Controls/XMod_Constants_In_Templates.htm


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:617

Send This Member a Private Message

04/21/2010 12:24 PM  

John,

In reply to your emailed question:

just wondered where the logic behind the showing / hiding of the Edit / Delete Icons on the main Listings template was - I cant see anything in the source ? - (this is roughly what i am trying to do)

These controls are all handled by XMod.

If a user has added a record they will see the edit icon and be able to edit only their listings if you have allowed them to edit arecord in the manage forms >> Settings tab

Administrator will always see all of the icons for edit, delete, and approve.

If you have created the listing on behalf of a user, you will need to go back in and edit the listing. An admin console of the form will be exposed to you, as administrator, and you can assign the listing to a user. This will now give them the ability to edit that listing.

The code for the edit, delete and approve buttons is toward the bottom of the list view template.

References:

http://training.dnnprofessor.com/BusinessDirectory.aspx

XMod Online Help
http://dnndev.com/help/xmod/default.htm

Look under the section for template tags

xmod:editbutton, xmod:deletebutton, and xmod:approvebutton


Also See:
Configuring User Permissions
http://dnndev.com/help/xmod/Content/Configuring_User_Permissions.htm

Walkthrough: Creating A Form
http://dnndev.com/help/xmod/Content/XMod40_Walkthrough__Creating_A_Form.htm

 


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


You are not authorized to post a reply.
Forums > Product Forums > Business Directory > Listing Template Modification



ActiveForums 3.7

Copyright 2004 - 2010 by Jive Media Group LLC. All Rights Reserved.  | Terms of Use | Privacy Statement | Email White Listing | Site Map