Developer forum

Forum » Templates » Database Publishing

Database Publishing


Reply

How can I make several types of master templates for the Database Publishing module? The way I've figured out this module works is, that it use the templates found in the /dbpub/base folder to create a set of custom templates, that are placed in the /dbpub folder. Is this correct?


 


How would I go at it if I had two sets of data (two completly different CSV files). Should I then copy the entire folder structure, that is the folder /dbpub including all subfolders. Will the module then know where to look for the master templates?


 


What is the folder /dbpub2/ for? It doesnt seem like its the same sort of templates as to be found in /dbpub/.


 


Is there any other documentation about the templates for Database Publishing than the short description found here - http://manual.net.dynamicweb.dk/Default.aspx?ID=4483 ?


 


Have anyone any experience with creating a set of templates that does not result in a basic table layout? What I mean is, the result is not a table with a headers and a row with all information.


 


I want to end up having something like this:


http://www.forbrugerliv.dk\images\advert\freebie_shot1.gif


And not a normal list liket his:


http://www.forbrugerliv.dk\images\advert\freebie_shot2.gif


 


It doesnt have to be a table-less layout :)


 


A more thorough explanation of how the set of templates work would also help a great deal.


Replies

 
Reply

Is it possible to make a direct mapping of a table in a datafile (SQL or CSV) to a DW Template tag?

 
Reply

Hi Sune


 


You cannot make serveral sets of mastertempdlates, they will always be the same.


But when you create a new view, you have the option to save your templates to another forlder under the tab called 'Templates'.


 


Forget about the 'dbpub2' folder.  It's garbage from the developers.


 


No unfortunately there is no other documentation for the templates.


 


The layout you want to achieve, is pretty easy to do  and will involve a little bit of floating regarding the date.


 


But you might experience some problems when you want to format the date.


The module displays the date found in the database and doesn't offer any way of formatting the output.


 


// Sebastian

 
Reply

No, you have to do it through Database Publishing.


 


// Sebastian

 
Reply

Thanks, I think I understand how the DBPub works now :)

 
Reply

I have another question about templates in DBPub.


 


I want to end up with html-code like this:


 


 



               
  • !--@Head_part1_t1title--Tilbud!--@Head_part2_t1title--

               


  •            
  • !--@Head_part1_t1createDateTime--Dato!--@Head_part2_t1createDateTime--


  •            


  •                

               


  •        


 


Its a simple unordered list, where I want to activate the sort functionality by clicking on one of the list items. It is very easy to just make the list and you can sort on both listitems. My problem is, that I want to assign an id attribute to the listitem that is currently being sorted on.


 


I can see that when you click a listitem now, the !--@Head_part2 tag shows the image for sorting (defined in another template). But I cant figure out where it knows what !--image tag to "enable". Since both my listitems in the example above have this image tag (they are afterall using the exact same template).


 


If the page somehow knows what itemtag that is currently active (clicked on) then I should be able to assign the id=activeItem to the same listitem. I just cant figure out how to do this.


 


Is it some javascript that replaces the !--image-- tag with the actual image template code, if so, where can I find this javascript?

 
Reply

I was not sure what forum to post this in, but since the thread about the module was already started here in Templates, my question goes here.


 


Is it true that you can not execute a stored procedure in the SQL tab and use this as the code to extract the data?

 

You must be logged in to post in the forum