• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Mark H
#1 Posted : Thursday, March 27, 2008 11:35:30 PM(UTC)
Mark H

Rank: Member

Joined: 12/19/2006(UTC)
Posts: 153

Obviously I'm missing something here, and would really appreciate some feedback. . .


The admin panel allows you to create new policies, but how are you supposed to use (display) them?



Inputting the code into the page:

Code:

<div id="newpolicyname" runat="server"></div>


and into the vb:


Code:
........
If Not Page.IsPostBack Then
Me.TitleLabel.Text = Content.SiteTerms.GetTerm("NewPolicyNameHere")

Dim policy As Content.Policy = Content.Policy.FindByBvin(WebAppSettings.NewPolicyNameHere)
For Each block As Content.PolicyBlock In policy.Blocks
newpolicyname.InnerHtml += block.Descript[b][/b]ion
Next

End If

.........

this does not work because "NewPolicyNameHere" is not a member of WebAppSettings (BVSoftware.Bvc5.Core.WebAppSettings.) Am I missing something, or does is what i'm trying to do require changing the WebAppSettings and/or Core? If so, why would BV put a "new" button on the policy page if ther is no way to use it?


I'm hoping I'm just missing something. . .



Thanks all, your comments are much appreciated.
Marcus
#2 Posted : Monday, March 31, 2008 3:07:14 PM(UTC)
Marcus

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 1,786

Mark,

The built-in polices have webappsettings hard coded to their GUID values for easy access. If you create your own policy you have to load it using the "bvin" value. You can get the bvin by looking in the URL when you edit your new policy in the admin. It will be on something like ?id=12414141

Code:

Dim policy as Content.Policy = Content.Policy.FindByBvin("my bvin goes here")
Mark H
#3 Posted : Wednesday, April 2, 2008 1:59:39 PM(UTC)
Mark H

Rank: Member

Joined: 12/19/2006(UTC)
Posts: 153

Marcus, that did the trick! Thanks much!
ppettit
#4 Posted : Thursday, April 2, 2009 3:17:24 PM(UTC)
ppettit

Rank: Member

Joined: 4/2/2009(UTC)
Posts: 37

Please excuse the thread necro ...

Originally Posted by: "Marcus" Go to Quoted Post
Mark,

The built-in polices have webappsettings hard coded to their GUID values for easy access. If you create your own policy you have to load it using the "bvin" value. You can get the bvin by looking in the URL when you edit your new policy in the admin. It will be on something like ?id=12414141

Code:

Dim policy as Content.Policy = Content.Policy.FindByBvin("my bvin goes here")


I had the same problem and question that the original poster had. The above code fixes the problem in that the data associated to the new policy shows up but it does not insert the policy name in the directory hierarchy or the sub heading "titles" in the page.

How can I get the page to pull this information properly? Is this something that will be fixed in the next version or am I missing the simple answer?
Paul Pettit
CIO, CCB Inc.

http://www.ccbnonprofits.com

Serving those that server others with affordable technology solutions.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012