Technical support This forum is closed.
Version 1.x > Technical support > Document Templates listed in "New Document" View modes: 
User avatar
Guest
norashlea - 4/22/2006 2:58:31 AM
   
Document Templates listed in "New Document"
Hello,

Where can I modify the "Parent Document" setting for a new document templates created via the "New Document Template Wizard" in Application: CMS?

I created a new document template, but somehow I messed up on that step, and so it is not listed in the "Choose a document type:" when I try to create a new item using this new template.

Regards,
Sharon.

User avatar
Guest
admin - 4/24/2006 5:57:25 PM
   
Re: Document Templates listed in "New Document"
Hi Sharon,

you need to go to Kentico CMS Desk -> Development -> Document Templates -> ... select the parent document templates -> choose "Allowed Child Document Templates" and add a new "allowed" template using the New button on the main toolbar.

Best Regards,

User avatar
Guest
norashlea - 4/25/2006 8:56:57 PM
   
Re: Document Templates listed in "New Document"
Thanks, Petr.

The template is listed now, but I've still got a problem ...

The new template I created is a "Media" template, based exactly on the existing News template. I created the two Transformations, default and preview.

On the Content tab, I can create a "Media" page, then added a "Media Release" item. But the Preview isn't displayed on the page. (I've checked the database table, and each new Media item I create is being recorded correctly.)

Have I done something wrong with the preview transformation?

<%@ Register TagPrefix="cc1" Namespace="Kentico.CMS.CMSControls" Assembly="Kentico.CMS.CMSControls" %>
<b><a href='<%# Kentico.CMS.TreeEngine.Functions.GetUrl( DataBinder.Eval(Container, "DataItem.AliasPath")) %>'>
<%# DataBinder.Eval(Container, "DataItem.MediaTitle") %>
</a></b> (<%# System.Convert.ToDateTime(DataBinder.Eval(Container, "DataItem.MediaReleaseDate")).ToString("d") %>)
<cc1:CMSEditModeButtons id="CMSEditModeButtons1" runat="server" DisplayDeleteButton="False" DisplayEditButton="True"
DisplayNewButton="False" DisplayPropertiesButton="False" Description="Edit Item:" SelectedNodeClassName="cms.media" SelectedNodePath='<%# Kentico.CMS.TreeEngine.Functions.RemoveCultureFromPath( DataBinder.Eval(Container, "DataItem.AliasPath")) %>'></cc1:CMSEditModeButtons>

<p>
<i>
<%# System.Convert.ToString(DataBinder.Eval(Container, "DataItem.MediaSummary")) %>
</i>
</p>

Regards,
Sharon

User avatar
Guest
admin - 4/26/2006 4:08:13 PM
   
Re: Document Templates listed in "New Document"
Hi Sharon,

Thank you for your message. Could you please write me how you set up the control for displaying Media Releases?

Thank you.

Best Regards,

User avatar
Guest
norashlea - 4/26/2006 5:01:30 PM
   
Re: Document Templates listed in "New Document"
Hi Petr,

Thanks for helping me with this.

Do you mean how I created the document template in Application:CMS?

Initially, I used the New Document Template Wizard. I had left the table name as the default CMS_media, but later modified the name to CONTENT_media. At the attributes step, I created the same fields as for CONTENT_news (*ID, *Title, *Summary, *Text and *ReleaseDate).

After the Wizard finished, I compared all the settings (attributes, transformations, queries etc) to the News template, and mirrored them all (except the Allowed Child Templates), modifying "news" to "media". I can't remember, now, whether the preview transformation was created by the Wizard, but I don't think it was and so I created a new transformation named "preview", of type ASCX user control, and copied the html from the News preview transformation into the Transformation Text box, and modified accordingly.

In my project, I created a new page, media.aspx, and added a cmsrepeater with the following attributes:

selectnodesorderby="MediaReleaseDate DESC"
selectnodesclassname="cms.media"
selectnodespathtype="AliasPath"
transformationname="cms.media.preview" selecteditemtransformationname="cms.media.default"
selectnodespath="/media/%"
selectnodeswhere = "MediaReleaseDate < GetDate()">

In CMSDesk, I registered media.aspx as a new page template, then on Content, added a new Page (Menu Item) "Media" using the page template that I had just created, as a sub-page of my already-existing "News" page (so that it will appear under the "News" item in the menu). I created a couple of new media items.

In CMSDesk, if I click on the media items in the site tree, the item is displayed in full. But the preview isn't displayed on the "Media" page that I created.

I also tried creating a "Media" Page (Menu Item) at the root menu level, but the same thing happens (I can see the media item detail page in CMSDesk OK, but not the preview on the Media page).

Regards,
Sharon.

User avatar
Guest
admin - 4/27/2006 6:11:52 PM
   
Re: Document Templates listed in "New Document"
Hi Sharon,

could you please try this:

selectnodespath="/%"
selectnodeswhere = "">

just to make sure the conditions are correct. Also, if you're using workflow, you may want to check if the documents were published.

Best Regards,

User avatar
Guest
norashlea - 4/27/2006 10:44:57 PM
   
Re: Document Templates listed in "New Document"
AHA -- as soon as I read your post I could see that my mistake was the nodes path!

There were two problems, actually. The page that I created is called "Media Releases & Awards", and so in the nodes path it should have been "media-releases---awards". In addition, it is a sub-section of the "News" page, so the full nodes path should be "/news/media-releases---awards/%".

(If I set it to "/%" I actually get all the media entries, irrespective of the page (created in CMSDesk) where the item is created. On both the page that is under "News" as well as the page that I created at the root level, I get all the headlines listed.)

Thanks,

Regards,
Sharon.