BV Commerce Forum
»
BV Commerce Support
»
General Support
»
What's the point of being able to create a new policy???
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.
|
|
|
|
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")
|
|
|
|
Rank: Member
Joined: 12/19/2006(UTC) Posts: 153
|
Marcus, that did the trick! Thanks much!
|
|
|
|
Rank: Member
Joined: 4/2/2009(UTC) Posts: 37
|
Please excuse the thread necro ... Originally Posted by: "Marcus" 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? |
|
|
|
|
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.