velocity templates works fine in developing web pages. But i would also like to include certain jsp pages inside my velocity template to include certain functionalities. But when i try, #include("xyz.jsp") it simply pastes the file in my template rather than binding it..kindly help me out..
You need to being using VelocityTools' ImportTool.
Related
I created a page within dnn (v9.0.2, 2sxc 8.12.0) with all modules (only 2sxc content modules) like the page design had defined it. After this I created a template from this page. After this I created a couple of sites using this template.
My problem is, if I change the content of module A on page 1 - all modules A on the other pages 2..n of this template have this content now too. Same effect, if I use the duplicate functionality.
Does anyone have a hint how to use page temlating using 2sxc content modules?
What you need to do is open the template file in an editor and locate the section that describes the module. The best way to do this is to find the EntityId of the content item on the page from which you created the template. Then, find that number string in the template. Just remove the string, leaving the XML node otherwise intact.
When you build the page, you'll get a 2sxc module that is uninitialized and you'll need to specify the content.
If anyone is listening, I wish that this behavior was different. I'd prefer that the template assigned to the module could be preserved, but with the default content showing.
Basically the issue is that DNN has only one way to export a page, and we would need something where our code could contribute something before the export is complete.
At the moment there are two ways to do this.
One way is to use the method described by Joe, modifying the XML export
The other way is to place un-initialized blocks on the template page - meaning that you select your content-type / template, or your app, but don't start adding any content yet. This should result in the identical XML as the one modified manually.
Is possible to use the font icon picker in a regular content template? I only got it to work inside 2SXC Apps but not inside regular Token Content. All examples I found where using the [App:Path] token to load the iconset. For regular Content Templates as there is no AppPath I tried [Portal:HomeDirectory] but I can't get it to load the icons. Is it limited to be used in Apps?
Thanks for help.
[App.Path] and #App.Path should also work on content templates, it's certainly not disabled on purpose. The path will always point to the Portals/x/2sxc/Content, so you can also hardwire it - but it should work.
I am currently working on a website and during the loading of the entire page, the page is "jumping" so that I would like to know how I can create an entire ,let's say black screen, where something is displayed during the time the page loads.
That seems quite easy but I was wondering because I have separate files for the header, the footer and the content on how to coordinate all of them, and still have a nice code.
I am working with angularJS. I read a lot about : $viewContentLoaded and also tried ng-cloak, but if any of you has an awesome solution to keep simple, it would be great :)
Thanks
I would say that one approach you can take is use some sort of templating engine for your HTML files (like Jade for example). In this way, you can keep all the code nicely separated in multiple files and using a task runner like Gulp or Grunt you can compile your HTML files before serving the page.
The important difference here is the fact that you won't have to load all the page parts (header, footer and so on) using AJAX requests. Instead, they will already be rendered in your HTML page allowing you to create a nice loader using ng-cloak on your content part.
I am using the Routing and Multiple Views feature of AngularJS but I don't see the HTML partial file (or the embedded Javascript) in Chrome's "Sources" tab of the Developer Tools.
In my index.html file, it includes all the tags for AngularJS, jQuery and Bootstrap along with my custom app/controller Javascript file. These files all appear in the Sources tab.
My application works correctly. As I click around between the links on the page, the partial HTML files are loaded and displayed and the files are listed in the Network tab.
The problem is that the partial HTML files do not appear in the Sources tab. How can I debug the Javascript in those partial files?
It looks like the closest thing to a debugger is Zone.js from the Angular team, especially since it will be built right into AngularJS in the future.
This means adding some more code, but the benefits seem to outweigh the cost.
I'm planning to use thw WebBrowser component to display html that is created on the fly. The perfect choice for this is NavigateToString or NavigateToStream methods. There's only one single problem - I need to load images / css styles / js files too. How do I accomplish this while using string/stream?
As an option I'm also considering writing/finding simple http server and running it on some port, but that's an additional work and requirements(open ports) so I'd like to avoid that if it's possible.
You can cast WebBrowser.Document to IPersistMoniker and load a moniker that implements GetDisplayName. Check http://csexwb2.googlecode.com/svn/trunk/cEXWB.cs for example code.
Faced with this same problem I created my own solution. You can see it here:
Reference an image imbedded in a WPF application from within an HTML file used as help content