Override template settings on the fly

Posted in: Newspaper
Post count: 36

Hi,

We are using the latest version of the Newspaper plugin and migrated fully to using the cloud templates.

Context. We have a set of pages that have a different look and feel from the rest of the website. Our approach to that is straight forward, we created these pages with TD Composer and made sure that they reference the desired header, footer and menu.

Now we have a new requirement, where, when a particular group of users visits the rest of the website, we want to apply the same look and look and feel (specifically headers/menu/footer) as the pages above.

We are using the “Simple Membership” plugin and we can differentiate between visitors that are logged in, or not. We can have more granular control than that (hence the requirement about a specific group of users).

Questions:

– Can we override the header/menu/footer selection for a sinlge post at run time?
My assumption here is that we can implement and trigger some conditional logic along the lines of
if(user_group_x()) {
// code to specify replacement header cloud template
// code to specify replacement menu
// code to specify replacement footer cloud template
}

– If Yes, how to we get about it?

– A secondary question is about the possibility to change the post layout in the same way i.e. can we override the Post template selection programmatically?

Kind Regards,
Pedro

Post count: 35449

Hi,

This is a good question, unfortunately I can not say for sure that you can do it, but it should be a way to do it at list for standard templates, but these are more over me and you an get a clear answer only if you make a request to our custom services from here -> https://tagdiv.com/web-development-services/

I think that if this can be done for header and footer it can be done for post too, but how I said above, these need very good skills and only a developer can solved these requirements.

Thank you!

Post count: 36

Hi Calin,

Thanks for your reply, we will contact the developer team. Do you have any idea of the current workload to estimate a response time?

In the meanwhile I have another, sort of, related question. We followed the steps below:

– Created a new category, let’s call it “_XXXYYYXXX” for now (the use of the “_” is intentional so it is the very first in the list when multiple-categories are ticked for a post)
– Imported a Category cloud template.
– Edited that Category template and clicked the “Manage” button, to select a header and a footer (other than the global one) to display.
– In the theme panel, we set the CATEGORY CLOUD LIBRARY TEMPLATE “_XXXYYYXXX” to use the Category cloud template we imported and edited. (*edit)

We then tested the behaviour under the following scenarios:
– Visit to category Page https://www.blah-di-blah.com/_XXXYYYXXX
– Visit to post where only the category “_XXXYYYXXX” is ticked but the primary category is NOT set
– Visit to post where only the category “_XXXYYYXXX” is ticked but the primary category is set to “_XXXYYYXXX”
– Visit to post where the category “_XXXYYYXXX” is ticked along with other categories, but the primary category is NOT set
– Visit to post where the category “_XXXYYYXXX” is ticked along with other categories, but the primary category is set to “_XXXYYYXXX”

(*edit) We also tested the same scenarios above with the Theme Panel POST CLOUD LIBRARY TEMPLATE option set to Inherit from Post Global Settings, as well as by selecting a cloud single template (where we had selected the same header/footer as the Category Cloud Template).

In all cases the resulting output on the browser respected the cloud template Header setting, however the Footer kept displaying the global setting.

Is that the intentional behaviour of the theme?

Regards,
Pedro

Post count: 35449

Hi,

Indeed the footer template is not apply like the header, for the moment this is a bit limited, you can set a different footer for pages and is working but in the way try for the moment is not working, we made a request to our developers to implement for footer the same functionality as for the header.

Thank you for your understating!

Post count: 99

Hi Calin,
I have a similar issue with the override template from the (site wide) setting.
I imported a single post template called (single-post-global) and edit to my liken and set it to be the default post template (site wide).
I then imported another single post template called (single-post-ABC) and also edit it to represent one of the categories named (ABC). Go to Per Category Setting and assign the template (single-post-ABC) to the category (ABC) under POST CLOUD LIBRARY TEMPLATE.
Now, when I create a new post, select “From Panel” from the post setting, select the category (ABC) and publish it. When I view the post it’s still under the default post template (site wide).

Post count: 18283

Hello!

We need to take a look to see what can be done there. Please contact us via email at contact@tagdiv.com and provide the following:

– admin url and credentials
– A link to this topic in order to identify you

Our team will take a look ! Please note that at the moment the support is a bit crowded. Replying may take up to 48 hours.

Thank you !

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.