Why don't "never" publish templates appear in the location scheme list?

Hi

Why is it that “never” publish templates don’t appear in the location scheme list?

I have a scenario that happens on pretty much ever implementation I do:

Content type has option binary field say unContact

The contact can have a optional image of the contact.

If I set the template to publish “always” then a 0 bytes binary will be publish when the user has not added one.

If I set the template to publish “never”, yes I can write a content list to only select the item where contact_binary IS NOT NULL but then the template does do appear in the location scheme list.

I can get around by first setting the template to either publish “always” or “default” to create the location scheme, then change to “never”.

Does anyone else experience this?

Cheers
James

James,

That’s the workaround I use as well.

I don’t know why this is, but I suspect that the original developer of those screens took “publish never” a bit too literally.

The publishing interface will be different in 6.6, but I have not verified that this issue goes away.

Dave

Nice workaround. I tried achieving this with dispatch template but no success. Let me see if I understand how this works with the following.

  • Image content type has two fields (among others): i_Image and i_Thumbnail
  • There are two templates for Image CT, both initially set to Publish=Default: b_Image and b_Thumbnail, using corresponding field bindings
  • Two Contexts are created; one for b_Image template, the other one for b_Thumbnail
  • Two Location Schemes added, each to appropriate Context
  • At this point, b_Thumbnail template can be switched to Publish=“Never”
  • Two Content Lists created, one to collect all Image CTs, the other to collect all images where i_Thumbnail field is not null
  • Those two lists are then added to the Edition, going through corresponding Contexts

Would that be correct?

There’s no reason that I can see for 2 contexts. Just use different schemes, one for each template.

This approach should work even with only one context.

Dave

But this is one content type with two templates. How will Rx “know” which location scheme to pick from the same context?

Hi Sinisa

Because a location scheme is set up for each template, even after setting the template to publish “never” it will still use that template’s location scheme.

Cheers
James

Right, there are two location schemes. Perhaps my Content Lists are incorrectly set then.

How about this:

  • Image content type has two fields: i_Image and i_Thumbnail
  • There are two templates for Image CT, both initially set to Publish=“Default”: b_Image and b_Thumbnail, using corresponding field bindings
  • Two Location Schemes (per each template) added to Context1
  • At this point, b_Thumbnail template can be switched to Publish=“Never”
  • Two Content Lists created, one to collect all Image CTs, default_template=“default”, the other to collect all images where i_Thumbnail field is not null, default_template=“none”
  • Those two lists are then added to the Edition going through Context1

I think the second content list the template should be “b_ThumbNail”, not null.

In 6.5.2, default_template has only three options: all (or unspecified), dispatch or none. Now I see I had the lists wrong again; it should be
“… - Two Content Lists created, one to collect all Image CTs, default_template=“all”,…”

As they are binary templates could you not use the sys_ListTemplateExpander and then specify the Binary template for each content list. Then it won’t matter if all the templates are set to default, so you can see them in the location scheme without changing things in workbench?

You definitely should be using the ListTemplateExpander for the thumbnail content list. The template should be set to “Publish Never”. I’m not sure which Default setting you are referring to, but Keevan suggestion is correct.

Dave

I was referring to the templates publish setting in workbench.

Dave what is the reason behind them being set to never in workbench? I would have thought as you are specifying the binary template to use in the content list there would be no harm in leaving the templates publish setting to default in workbench?

Hi keevan

The label is a bit misleading now Rhythmyx has moved to 6.x. It used to mean “never” publish as part of the Site Root Full or Site Root Incremental publishing lists. I think “custom” would be a more appropriate label as you then have to create a custom content list specific for the template.

Cheers
James

I thought sys_ListTemplateExpander is for database publishing only?

(default_template is a sys_SiteTemplateExpander parameter)