Hi All,
Can anybody tell me how Spaces and Categories and Sub-categories are linked into Database.
I know about the Space_key and Space _ID under table.
I am using BreadCrumb plugin which shows the flow of my current page.
I need to know how this call is made, which tables are queried to bring the data in front.
Space categories are actually labels. Here is the relation:
select s.spacekey, l.name from spaces s, content c, content_label cl, label l where s.spaceid=c.spaceid and c.contentid=cl.contentid and cl.labelid=l.labelid and l.namespace ='team'
Spaces can have more than one categories. In case you want them in a single row per space with MYSQL you can use the following query:
select s.spacekey, GROUP_CONCAT(l.name) from SPACES s, CONTENT c, CONTENT_LABEL cl, LABEL l
where s.spacetype = 'global' and s.spaceid=c.spaceid
and c.contentid=cl.contentid and cl.labelid=l.labelid
and l.namespace='team' group by s.spacekey
I also added a criteria to get only the site spaces.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.