Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2015-01-01 10:40:24

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Name of top level Breadcrumb

How to change the name of the left most bread crumb? It's currently set to the URL path, and not being
set to the name of the page it points to.

I'm trying to do what I find here: http://ce4.theturninggate.net/demos/01-ce4-gallery/

My main Photos page is built by Auto-Index. It contains the thumbs linking to several Gallery
templates, such as Faces and Portraits. Going into a gallery I would show the breadcrumbs.

This is the breadcrumb that appears on the Faces gallery page:

/photos/ » Faces

I want it to appear like this:

Photos » Faces


FYI - I'm currently redesigning the same hierarchy in CE4 that you can find here: http://reekes.net/photos/. The main
site is built in WordPress, and only the pages under /photos/ are built by TTG. I'm also
using PHP Plugins to integrate the two worlds. None of the main navigation you find on the site comes from TTG.

Also note that the Photos page was built with Auto Index. I created the template in the normal method, but then copy the template files into the /photos/ directory. Note this page was not built by Publisher. Is this why I would need CE4 Pages (just to create this one page)? Or would I create an Album Set in Publisher that contains everything under /photos/ ?

Is there some easier thing to do I'm missing?


--Jim

Offline

#2 2015-01-02 09:34:15

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: Name of top level Breadcrumb

I'm guessing you'll need CE4 Autoindex as your top-level gallery folder for that to work correctly.

Auto Index is responsible for my top level folder /photos/, but it's not created or managed by Publisher.

I can't remember why I do it this way...but I'm guessing it was suggested long ago in a forum post.

Publisher is managing all the folders within /photos/ but not the actual /photos/ top level.

The way I create it is to export my Auto Index template, and then copy it's contents to /photos/.

I created /photos/ and then copied the files from the Auto Index template shown below.

/photos/autoindex.xml
/photos/index.php
/photos/lib/
/photos/setup.xml
/photos/template_index.php

Publisher is then set to have the root of /photos/ and I create all the albums from there.

Is there a way to have the top level /photos/ managed by Publisher with an Auto Index template?

That would mean creating a new Album Set, and then putting all of my existing Albums into it, right?

I'd have to think more how to manage this.

PS - I'll copy the above comment to my original post on this, to keep the thread together.


--Jim

Offline

#3 2015-01-02 10:24:58

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Name of top level Breadcrumb

All I know is that I've created several CE4 autoindexes that serve as top level gallery folders for Publisher instances. In each case, when you get into the galleries thermselves, the breadcrumb leads back to the index page using nicely formatted words.

For example, if I upload an autoindex named "extra-galleries" and then create a Publisher instance with extra-galleries as the top level folder, the breadcrumbs in the albums contained in that index will be : Extra Galleries >> name of album. or
Home >> Extra Galleries >> name of album, depending on if I'm using the Home breadcrumb.

It looks like there's some parsing going on. Either from the folder name entered for top level galleries folder in Publisher set up, or from the folder name of the autoindex itself. Dashes are being removed and each word is capitalized.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#4 2015-01-02 12:01:05

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Name of top level Breadcrumb

Hi Jim, I haven't been able to find breadcrumbs on your site.  Can you provide a link to a gallery with the problematic home breadcrumb name?

Pages drops a file into galleries/, called gallery.xml, that provides the name and location of the home breadcrumb.  If this file does not exist, then Publisher attempts to work out the name based on the directory name.

It may help if you create gallery.xml inside your photos/ directory.  As is an example of what it might contain:

<?xml version="1.0" encoding="UTF-8"?><gallery>
    <name><![CDATA[Galleries]]></name>
    <redirect>../galleries.php</redirect>
</gallery>

Change Galleries to whatever you need, and also change redirect to a relative URL that points to the top-level index of photos.  You may need to play around with this.

../photos/

may provide the link that you want.

Offline

#5 2015-01-03 02:58:10

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: Name of top level Breadcrumb

Can you provide a link to a gallery with the problematic home breadcrumb name?

My sandbox for designing the new pages with CE4 is:

stage.reekes.net/photos/


I'm only using Gallery, Auto Index, and Publisher.


--Jim

Offline

#6 2015-01-03 10:57:38

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: Name of top level Breadcrumb

Thanks Ben, adding a gallery.xml file to the /photos/ directory (the root of Publisher) with this content has solved the mystery.

<?xml version="1.0" encoding="UTF-8"?>
<gallery>
  <name><![CDATA[Photos]]></name>
</gallery>

--Jim

Offline

#7 2015-01-03 11:05:18

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Name of top level Breadcrumb

cool. This is good to know for future reference. Thanks for the update.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#8 2015-01-03 20:47:19

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Name of top level Breadcrumb

Hi Jim,  thanks for confirming.  It's still a mystery to me why your gallery was displaying '/photos/'.  The algorithm should have shown that as 'Photos'.  The strangeness is more of why the slashes were picked up in the directory name. Capitalising the first word in '/photos/' resulted in '/photos/', whereas capitalising the first word in 'photos' would have correctly produced 'Photos'.

Offline

#9 2015-01-04 00:47:24

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: Name of top level Breadcrumb

Ben wrote:

still a mystery to me why your gallery was displaying '/photos/'

The only mystery (for me) was how to tell TTG the name I want to use in the breadcrumbs. In other words, how would TTG know my intended name for the directory?

I couldn't find any such field for the breadcrumb name in the Gallery plug in, or in the Publisher setup.

Again, note that the /photos/ directory is the top level location I created on my server. Publisher is told that's the root directory, but there's no place (that I know of) to tell Publisher the desired name of that directory. This root level is managed entirely manually. I create the Auto Index files by exporting from the web module, and then manually copy them via FTP to /photos/.

Publisher, as I've been told, cannot manage the root level and doesn't place any files into the root level. It only created sub-directories within it for the albums.

Adding the gallery.xml file is the only way I know of for the Gallery template to pick up the desired name to use in the breadcrumbs. If I don't place a gallery.xml file in /photos/ then how would TTG know the name I want to use?


--Jim

Offline

#10 2015-01-04 01:06:03

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Name of top level Breadcrumb

The only mystery (for me) was how to tell TTG the name I want to use in the breadcrumbs. In other words, how would TTG know my intended name for the directory?

As Ben said, that is taken from the name of the directory itself. There is no field to enter that other than when you name the top level galleries directory.

For Albums and Album Sets, the name is taken from the Title when you create or edit the Album or Set. Or you can enter a different name for the bread crumb in the Album set up/edit dialog in the Breadcrumb field under the Features tab.

Adding the gallery.xml file is the only way I know of for the Gallery template to pick up the desired name to use in the breadcrumbs. If I don't place a gallery.xml file in /photos/ then how would TTG know the name I want to use?

As Ben said, it should extract that from the name of the top level galleries directory. What did you enter in Publisher for the top-level galleries directory? It should have just been "photos" (without the quotes)


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#11 2015-01-04 07:44:59

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Name of top level Breadcrumb

For Pages setups, the name is set in gallery.xml.  For non-pages, it should be deduced based on the directory name, e.g.
photos => Photos
my-photos, my_photos or my photos => My Photos

Or alternatively, handled in the same way by uploading the gallery.xml file as you had done.  Clearly there is a hole in the documentation or functionality.  Publisher does have a publisher_root table that has an entry for each top-level gallery directory. That would be a good place to add a Title field that could then be exposed to the user for editing in the Publisher admin.

Offline

#12 2015-01-04 08:37:07

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: Name of top level Breadcrumb

Sigh - there is no Pages. I do not have Pages. "I don't need no stinking Pages" as far as I understand.

If there is some reason I should be using Page, let me know so I can purchase it.

For non-Pages users, I can't see how TTG could know the name of my directory. It's just a web site. The directory is /photos/ in FTP and I don't understand how anything (TTG included) could ever understand how that should be called "Photos" (according to me).

Bem wrote:

Publisher does have a publisher_root table that has an entry for each top-level gallery directory. That would be a good place to add a Title field that could then be exposed to the user for editing in the Publisher admin.

OK - where do I add the "Title field" name of the publisher_root, so Publisher would pick up that name? I'll delete the manually created gallery.xml file and instead update things according to your advice.

I hate being a pest. It seems like we've not connected on how things actually work.


--Jim

Offline

#13 2015-01-04 09:26:01

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Name of top level Breadcrumb

There is no Title field.  I was just thinking aloud about how I may improve the product to handle this better.

I'm not saying you need Pages, but rather highlighting the mechanism for discovering the name is different between Pages and non-Pages.  In your case, had this mechanism worked, 'Photos' would have been the correct title for the publisher to come up with.  And if that wasn't what you wanted, then the gallery.xml file offers the same mechanism that Pages provides.

Offline

#14 2015-01-04 11:45:18

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Name of top level Breadcrumb

For non-Pages users, I can't see how TTG could know the name of my directory. It's just a web site. The directory is /photos/ in FTP and I don't understand how anything (TTG included) could ever understand how that should be called "Photos" (according to me).

why not? php can replace things like - and _ with spaces and capitalize first letters of words.
But I believe that the code is looking at what you've entered as the top level galleries folder in Publisher set up. So I believe it's parsing that. That should only be the name of the folder without any slashes. In your case, it should just be "photos" (without the quotes). It's then parsed to replace dashes and underscores with spaces and capitalize the first letter in each word.

From what I'm reading, this is what's puzzling to Ben: Why Publisher is creating /photos/ for the breadcrumb rather than Photos, assuming you've just got 'photos' as the top level gallery folder


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#15 2015-01-04 12:46:16

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Name of top level Breadcrumb

Looking further into this, I've found that Publisher quite happily accepts "/photos/" as the top-level gallery directory specified in the Publisher instance.  This still functions correctly, other than in creating a readable title from the directory name. 
I've changed the code that creates the readable title to remove leading and trailing slashes before performing the hyphen and underscore replacement and uppercasing each word.  This fix will be in the upcoming Publisher update due in the next couple of weeks.

Offline

#16 2015-01-05 10:14:23

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: Name of top level Breadcrumb

Ben wrote:

Publisher quite happily accepts "/photos/" as the top-level gallery directory specified in the Publisher instance

In Publisher, I had specified the top-level simply as "photos"

I'm assuming the text "/photos/" was taken from the Auto Index template, where I specified that as the Site Root.

I'm guessing the breadcrumbs for the page built by Auto Index, which I copied into /photos/, was simply using the Site Root field for the top level bread crumb. I don't see how Publisher or anything would know the human name I wanted for the breadcrumb.

I don't think there's a bug. It's just something I couldn't find documented.

To name the root level was to create the gallery.xml file, along with all the other template files from Auto Index I exported. I think if I was using Pages this wouldn't be necessary. But without Pages, none of the templates would know the human name for the root directory.


--Jim

Offline

#17 2015-01-05 19:30:08

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Name of top level Breadcrumb

Hi Jim, I get where you're coming from.  The Publisher can't tell exactly what you intended to call it, which is why we provide another mechanism, albeit one that we have failed to document.  Our products aren't perfect, but we endeavour it improve them, helped greatly by feedback such as you've provided.

Could you have called the top-level directory "/photos/" when you first set up the instance?  Following the code, it is that value as-entered that is saved in the database, and used by Publisher to attempt to create a readable directory name.

Offline

#18 2015-01-06 01:28:26

JimR
Member
Registered: 2012-11-30
Posts: 348
Website

Re: Name of top level Breadcrumb

Ben wrote:

Could you have called the top-level directory "/photos/" when you first set up the instance?

That's very much possible, but I don't recall. The top level did change. It took me a while to set everything up, and I was moving things around on my site to create a staging area at the same time.

I appreciate your looking into this. I think all that was missing for me is how to setup Gallery and Auto Index with Publisher on a site that isn't fully managed by TTG. I only needed /photos/ dir managed by publisher. I just tried to duplicate what I already had done in CE3, but the missing piece was the new (and welcomed) breadcrumb feature.


--Jim

Offline

Board footer

Powered by FluxBB