Skip Navigation

[Resolved] Replicating a resources page

This support ticket is created 5 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 13 replies, has 2 voices.

Last updated by Nigel 5 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1337663

We have this page
hidden link

and I have duplicated this page and created a new one called
hidden link

We would like to add a different set of tabs along the top of this page, which resources can be tagged, allocated to.

The new tabs should be:
- Webinars - PowerPoints (where we can add resources)
- Handouts (where we can add resources)
- Characteristics of Effective Learning and Outdoor Learning

I went to the
hidden link

and attempted to change the layout queries shown on the page, to pick up the new taxonomy, but when I did this it also changed it for the original hidden link page as well

Can you explain the steps I need to take to achieve the above?

Thanks

#1337817

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I read your ticket and tried to follow the chat thread, although I was a little lost in the details.

I didn't go too far into those, because I notice that Minesh misinterpreted the problem in the first interaction, which may have introduced some confusion about how to handle this.

Let me clarify what I see as the problem and what's pertinent in your set up, and that might be enough to get you off on the right foot. In support our intention is to help clients use the product rather than to jump in and do it for them, and hopefully I can steer you towards what you need to do, and if you need clarification you can come back to me.

So... first let's be clear on where the Layouts editor can be used.

It is most commonly used for creating templates, e.g. templates for posts of some type, or for custom archives of some post type etc.

You have a Layouts template "Single: Page" which is the template used for displaying standard pages.

(Looking at it, it's actually redundant, because all it does is output the post content, which means that the page content is being replaced by... the page content, and nothing more. So you could delete this template and it would make no difference to your site.)

Your initial page (hidden link) uses this template.

But, the page content itself is also designed using Layouts (this is the "Content Layout" editor).

Whereas a template is used across posts (or pages), a Content Layout is specific to a post (or page).

You used a plugin to be able to duplicate the page.

The duplicate page (hidden link) has a copy of the content of the first page, but it's not linked. You can make changes to the Content Layout of the second page independently of the first page, e.g. if you added some text in a cell on the second page it would appear there, but not on the first page.

Now, you also include Views in your content.

You could delete a View from the second page and it would have no effect on the first page, but if you make changes to the View itself then those changes would be reflected wherever the View is inserted, in this case in these two pages, but also if you added it anywhere else on your site.

A View queries the database for some content (typically some posts according to some criteria, but it could be terms of a taxonomy, or users, too) and then outputs it.

When you are working with Layouts, you can either insert an existing View (you can list the available Views at Toolset > Views) or you can create a View directly within Layouts (but it will still appear at Toolset > Views, and can be used in other places, too).

So if on the duplicate page you want Views to appear in the same place as some existing View but it should output different content, then you should replace that View with a new View which shows what you want.

If you are only changing a few things (e.g. changing the taxonomy filter) you could go to Toolset > Views and duplicate and existing View and make whatever edits you need, then go back to the Content Layout editor of your page and change the View to use the new one.

Is this making sense?

I feel like this is a good place to pause and for you to digest the above and see what specific help you may still need.

#1337863

Hi,

Thanks for explaining, that makes more sense now.

So where I have reached is to have this page
hidden link

Which I have set up a new 'Webinars' tab.

The issue that I have is that no items show under the tab.

I have already gone to a product and added a product category of webinar
hidden link

But it is still not showing.

I guess I'm missing a step somewhere?

Thanks
Dan

#1337927

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Dan

So, you have added a section for Webinars, but you haven't added anything to that section.

The other sections in tabs—Phonics, Interests, Areas of Learning—each have a View to output terms from the Resource categories taxonomy.

Now, I've spotted something which is a real impediment to understanding the set-up. If you edit the View within the Layouts editor you can see all of the details of the View (what is being queried, how the results are output), except the Query Filters are missing. (I'm going to have to do some more testing of that and report if necessary, but let's put that to one side for now.)

If you instead open up another browser tab and edit the Views directly through Toolset > Views then you can see that each View contains a Query Filter.

So the phonics View, for example, includes a Query Filter "Select taxonomy terms whose parent is Phonics".

So your Resources categories taxonomy is a hierarchical taxonomy with top-level terms such as Phonics, and these Views are designed to output the child terms below—in this case—the Phonics parent term (together with displaying post counts for the terms).

Now, if you want Views to do something similar-but-different for "Webinars", for example, then you need to create a new View that will output the Webinar terms. If the output format is going to be largely the same you can duplicate an existing View, e.g. the phonics View, and then change the settings for which terms to output.

Note that you may need a slightly different approach with Webinars.

The other filters set a parent term, e.g. show terms that are children of the Phonics term.

But the Webinar term has no child terms, so such a filter would mean showing nothing.

If you would mean to show content for the Webinar term itself then you could use a Query Filter where you specify the Webinar term explicitly, so that the View would just return content relating to the webinar term.

Long story short, nothing appears in the Webinar tab because you've added no content to it. You need to edit the Content Layout and in the cell beneath the webinar tab insert what it is you want to appear there. If you want something akin to what is generated by Views in the other tabs you will need to create a new View (or duplicate an existing one and edit it) that outputs what you require.

#1337985

Ok,

So sorry, this is where it starts to blow my mind a little.

Here is the view I created
hidden link

Which I then went to the layout TrainingDW and added the view to it.

I'm not understanding the point on why no results are showing. I get there needs to be a query to select said results, but surely first surely I need to make sure I tag in some manner the products that should show up.

The Webinars tabs should work in the same manner as any other tab on the resources page.

Have you at least seen the access details to the site to login?

Thanks

#1338641

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Yes, I have been logging in to the site, that's why I'm able to talk about your set up in such detail.

The View you have created is to display terms from the Resource categories that are child terms of the Webinars category. But, unless I'm mistaken, the Webinars category has no child terms, so there is nothing to show.

I just inserted the View directly into a page called "Nigel" for testing and if you visit that page you should just make out at the top (the margin and text colour make it difficult to spot) that it is outputting "No items found", confirming that there are no child terms of the Webinars category, and hence nothing to show.

That is the point I raised at the end of my last reply.

The Webinars View can't work the same way as your other Views because of the structure of your Resource categories taxonomy.

#1338695

Hi,

So are you saying with this
'But, unless I'm mistaken, the Webinars category has no child terms, so there is nothing to show.'

If I add child items to the webinars category and then tag products to these child terms the search will work? If the answer is yes, that would be a potential solution.

So parent would be webinars and child maybe 'September' I just need to know if that solves the issue and the correct way to tag an item with it etc.

Thanks

#1338707

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I can't promise it will work inasmuch as I don't know your project and how the data is structured nor even what is intended (is the person who set this up in the first place not available to discuss?).

But what I can say is that if you create child terms for the Webinars resource category the same way that the terms such as Phonics have child terms then this View will find and iterate over those terms and output the fields included in the output section, just as the other Views do for those other terms.

They seem to just be outputting ordinary fields relating to the taxonomy (e.g. the term title), and so I don't see any reason why it shouldn't work.

#1338717

Ok, so now I think we are making progress - if you see here
hidden link

You will not that now a product that has been tagged with September as a child of Webinars can be seen on the page!

That gives me what I need I believe.

I presume that this content can only be viewed by someone that has a paid for account?

Dan

#1338723

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-09-12 at 13.03.08.png
Screenshot 2019-09-12 at 12.57.33.png

Great!

This is what I see as a guest visitor (screenshot), and I can also see the content in the other tabs, such as phonics.

It doesn't seem like you are applying any restrictions to your products, they are visible to guest users.

You can specify who gets to see what using Toolset Access.

I see you already have it installed, and it is already being used to manage the products post type, where guest read access is permitted (screenshot).

If you are not familiar with Access I suggest you spend a little time reading the documentation to understand how it works: https://toolset.com/documentation/user-guides/access/

If you have a specific question, let me know.

#1338743

If you click through to this page, without being logged in hopfully it shows as restricted and you needing to login to download the asset?

hidden link

#1338745

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-09-12 at 13.14.44.png

This is what I see.

(Open a private browser tab and you'll be able to see the same as guest users yourself without having to log out.)

#1338775

Thats fine as you wont be able to actually download the resource. Think we are ok for the short term until I build the rest out.

#1338793

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Understood.

This is already turning into a long thread, and as the original issue is resolved, let's close this and you can start a new issue if you run into a new problem.

You are welcome to request me when you open the issue.