Publishing location schemes - Inline link - Can't use a 'Text page' template

Hi, Ok I’ve run in to an issue when trying to set up a new publishing location scheme for a content type’s template in Rhythmyx 6.5…The background of the issue is explained below:

  • We have a content type which is published solely to a SQL database using a database publishing template, the data and content published to this database are used by a .net application. No actual html files are assembled and published to the server for this content item. A friendly URL is used by the .net application to view content items published to the database. The URL is built using data entered in the content item’s content editor.

  • To aid our users we’ve built a preview template for this content item. This is a text/html template which simulates what the content will look like when used in our application. The “Output” option is set to “Text page” and the “Publish” option is set to “Never” for this template, as it’s only used by users to preview a content item in the content explorer.

  • I’ve been looking at ways to set up inline links from other content items and types to content items which belong to the content type which is database published. To do this I set up a publishing location scheme for the “Publish Context” which constructs the friendly URL used by the application when published. The Generator type I used for this location scheme was “sys_JexlAssemblyApplication” and when I went to choose template type the only template type available for my content item was the database publishing template, so I chose that. I set up an expression which constructed the URL, and tested it by setting up an inline link from a general page to the content item which belongs to the content type which is database published. When I previewed the general page and changed the context to 1 (publish) the link had the correctly assembled friendly URL in it, as expected - great! However…

  • The problem I’ve come across is that when I preview the general page and the context is left at 0 (preview) the inline link points to the database publishing template for the content item being linked to…What I’d ideally want is when previewing the general page and the context is left at 0 the inline link actually points to the preview template I set up for my database published content item.

  • Because of this I looked at whether it was possible to use the preview template for the location scheme I set up rather than the database publishing one. This however was not possible as the publish option on the preview template was set to “Never” as this is never actually published out. The only way I could get the template to appear in the template dropdown for the location scheme would be to change the publish option for the template to “Default”. So I did this, however this lead me on to my next issue…

  • I had a location scheme using the preview template, now I needed to add that template to the inline link slot. When I went to do this in the workbench I discovered that it would not allow me to add this template to the inline link slot as it’s Output type was a “Text page”. So now I can’t add that template/location scheme to the inline link slot. The only way to get this template to appear as allowed content for the inline link slot is to switch it’s "Output option from “Text page” to “Snippet”…doing this however changes the templates “Publish” option to “Never”…meaning I now don’t get the option to use this template in the location scheme I created!

So my question is, is there anyway in the publish context I can create a location scheme for a template whose output type is “Text page” and which is set to “Never” publish? And is there anyway I can add this template to the inline link slot?

I hope all the above makes sense!

Hi George

You can setup location schemes for publish “never” templates but you must first set them up as either “default” or “always” so you can select them from the drop down list. Once the location scheme has been created you then switch the template back to “never” and it will still use the location you’ve setup.

Cheers
James-

Hi James, thanks for replying. I had a go at your suggestion and it let me set up the location scheme, which is great!

When I attempted to add the preview template to the inline link slot in the workbench it wasn’t having any of it (I’d select the content item, but the template wouldn’t appear in the list of available templates)…The only way I could get it to appear was to switch the “Output” option on the template from “Text page” to “Snippet”…I did this and everything is now working. I don’t think it matters that I’ve changed the output type for this template as it’s never published anyway, and it previews the same either way.

Thanks!