NVelocity Syntax in Webpages
NVelocity Syntax in Webpages
In AC 7 it was possible to include NVelocity syntax in custom web pages and all custom web page content was stored under App_Data\Scriptlets folders. It seems that AC Gold
NVelocity syntax like #if/#else/#end can not be included directly in webpage content. Referencing custom controls like [[ConLib:ControlName]] works, but not #if/#else/#end statements.
Where is the custom content stored in AC Gold? In AC 7.x all custom content is under App_Data\Scriptlets.
NVelocity syntax like #if/#else/#end can not be included directly in webpage content. Referencing custom controls like [[ConLib:ControlName]] works, but not #if/#else/#end statements.
Where is the custom content stored in AC Gold? In AC 7.x all custom content is under App_Data\Scriptlets.
Mike Kolev
Re: NVelocity Syntax in Webpages
You are right NVelocity will not work in pages any more. NVelocity was very helpful for quick checks within view but what we saw people started to use it like programming language alternative in AC7. NVelocity involves extra processing resulting the slow pages. In gold we decided to take away the NVelocity support from ablecommerce pages in order to make things simple and improve the page performance. Though there is an option to enable nvelocity rendering for dynamic pages like product, category or content pages making use of HtmlContainer control but we don't recommend it and you would be on your own if any thing doesn't work.
Now regarding scriptlets they are also removed from Gold. In past we found that scriptlets over complicated the page creation in AbleCommerce. It was quite hard to figure out what is being applied on a AC 7 page. In Gold we abandoned the scriptlets and moved to simple Master + Content page scheme. ASP.NET allows you to change master page on fly hence we created Layouts using master pages where we can apply different layouts on content pages dynamically without the need to change code. Now if you want to add new page you can simply create a new content page under Administration -> Webiste -> Webpages and all contents will go to database table ac_Webpages. These dynamic webpages do have the support to render ConLib controls as you already mentioned in your post so in Gold its kind of easy and simple to mange/create new pages. Alternativly you can add a physical page yourself which will only need you to extend if from suitable master page and thats it, no more pointers to different scriptlets under app_data simply add page and drag/drop the conlib controls.
Now regarding scriptlets they are also removed from Gold. In past we found that scriptlets over complicated the page creation in AbleCommerce. It was quite hard to figure out what is being applied on a AC 7 page. In Gold we abandoned the scriptlets and moved to simple Master + Content page scheme. ASP.NET allows you to change master page on fly hence we created Layouts using master pages where we can apply different layouts on content pages dynamically without the need to change code. Now if you want to add new page you can simply create a new content page under Administration -> Webiste -> Webpages and all contents will go to database table ac_Webpages. These dynamic webpages do have the support to render ConLib controls as you already mentioned in your post so in Gold its kind of easy and simple to mange/create new pages. Alternativly you can add a physical page yourself which will only need you to extend if from suitable master page and thats it, no more pointers to different scriptlets under app_data simply add page and drag/drop the conlib controls.
Re: NVelocity Syntax in Webpages
Thanks Mazhar,
Yes, not allowing NVelociry syntax in content pages totally makes sense. Thank you for the detailed explanation of my questions.
Yes, not allowing NVelociry syntax in content pages totally makes sense. Thank you for the detailed explanation of my questions.
Mike Kolev
Re: NVelocity Syntax in Webpages
What about dynamic menus - nvelocity allowed use to do that. Now I'm not sure how..?
Pat.
Pat.
Re: NVelocity Syntax in Webpages
You can implement the menu to be a conlib control and then you can use the ConLib in pages where you want to show the menu.
Re: NVelocity Syntax in Webpages
I'm talking about fine grain control of menus based on roles of users - what you've proposed is not solution unless I'm missing something.mazhar wrote:You can implement the menu to be a conlib control and then you can use the ConLib in pages where you want to show the menu.
- ForumsAdmin
- AbleCommerce Moderator
- Posts: 399
- Joined: Wed Mar 13, 2013 7:19 am
Re: NVelocity Syntax in Webpages
I don't think having or not having NVelocity syntax available will have any bearing on how a menu based on user roles is implemented. NVelcoity did not offer anything special as far as user roles are concerned.
If you want to implement role based menus, checkout how admin menu is implemented.
Admin/ConLib/AdminMenu.aspx
App_Data/adminmenu.xml
If you want to implement role based menus, checkout how admin menu is implemented.
Admin/ConLib/AdminMenu.aspx
App_Data/adminmenu.xml
Re: NVelocity Syntax in Webpages
Hi ForumsAdmin,
thanks for the feedback I'll look into these.
Regards,
Patrick.
thanks for the feedback I'll look into these.
Regards,
Patrick.