HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS. ocPortal 9 is superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

New Gallery in a Zone

Login / Search

 [ Join | More ]
 Add topic 
#37150 (In Topic #8391)

Fan in action

Is there a way of creating a new gallery tree in a "zone"

I've created a new zone for "paid members" and have it all working. The only thing I can not figure out is how to create a new Gallery under that zone. I'll plonk around a bit more but spent a long time on this to no avail.

If someone could point me in the correct direction would be very helpful.

Everyone have a great 2008 …


Back to the top

Fan in action

Not sure if I have done this correctly. I copied the galleries.php into the new zone under modules.

(made some changes etc at this point to associate the galleries to the new location)

So now when I go into the "members zone" gallery my left_panel does not change. (Hope this makes sense, I'm new to all of this!)

But, is there a better way of doing this? I was hoping to have two (or three) totally separate Galleries.


Back to the top

There's no need to copy the galleries.php file, as you can set up redirections to make modules appear to run from multiple zones. To do this, go to 'Structure' in the Admin Zone, then 'Redirects'. If you had a zone called 'test' you'd set up a transparent redirection from 'test':'galleries' to 'site':'galleries'. If you then link to galleries from the test zone (either by using a URL that suggests that zone, or by using the page-link test:galleries), you'll be viewing it entirely from your test zone.

How to have separate galleries in different zones is a separate issue to making the galleries module run in different zones. This can be achieved by linking to the galleries module using ocPortal's "virtual roots" feature. The reality is that you'll have one tree structure of galleries, but the virtual roots system will hide it.
The easiest way to do this is as follows…
  • set up galleries for each zone you want galleries in, each coming off your root gallery.
  • add your content to these galleries
  • browse into one of your galleries. You'll see it appearing as the system sees it by default - that is, you'll see the full navigation structure of the galleries in the breadcrumbs (the breadcrumbs are those horizontal chevron-split links towards the top right of most screens).
  • look closely at your breadcrumbs whilst you're still in the gallery (not viewing an image, in the gallery). Assuming you're logged in as staff you'll see that the last item in the breadcrumbs is a link, and if you think, it doesn't need to be a link because you're already looking at the gallery it's linking to. This is the twist – if you click the link, you'll see that this seemingly redundant link is actually special – after clicking it, the breadcrumbs have reduced, making it look like this gallery is the root gallery. You saw this extra link because you were staff, you're regular member's don't see it.
  • look at the URL. You'll see that this effect is achieved by some extra information embedded into it. You can  take this URL and put it onto the menus as you require it (modified for the right virtual root, and the right zone, as appropriate).

Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: