This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 11 - Pages: 1 - Last Post: 04-May-2016 03:44 Last Post By: ctwist Threads: [ Previous | Next ]
StewartS

Posts: 8
Registered: 16-Feb-2007
Global header and footer no longer working on slides
Posted: 13-Jan-2009 13:08
 
  Click to reply to this thread Reply
Since updating to Jalbum 8.1 (now 8.1.6), I have noticed that global headers and footers are no longer appearing on my slides, although they are still appearing correctly on my index pages. I am using a slightly modified version of ExhibitPlus 1.5, but the problem also occurs with the unmodified version. Both the index.htt and slide.htt files have identical code to include $rootPath/styles.inc, $rootPath/header.inc and $rootPath/footer.inc.

The ja:include is not working when generating slides using JAlbum 8.1.6, but was fine using version 8.0.9. It looks like the value of rootPath has been lost - could this be a side effect of the changes to include widgets?

Any advice gratefully received!

Stewart
jimberry

Posts: 7,465
Registered: 30-Aug-2004
Re: Global header and footer no longer working on slides
Posted: 13-Jan-2009 14:10   in response to: StewartS in response to: StewartS
 
  Click to reply to this thread Reply
could this be a side effect of the changes to include widgets?
That should be easy to check.
At Settings>Advanced>Metadata uncheck the box for "Include Jalbum widget support" and try again.
If there is still a problem, can you give us a link to the affected album?
If that is not possible, you could attach to a reply one of the affected slide HTML pages.
StewartS

Posts: 8
Registered: 16-Feb-2007
Re: Global header and footer no longer working on slides
Posted: 13-Jan-2009 15:16   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
Hi Jim,

Thanks for the suggestion. I have regenerated the album without widget support, but get the same result. I have attached the html of the same slide generated by Jalbum versions 8.0.9 and 8.1.6, a link to the working version on my site URLhttp://www.payanke.com/gallery/sunsets/slides/102-2078.html[/URL] and an image of the newly generated one.

As an experiment, I tried removing '$rootPath/' from the ja:include statements in the slide template, and found that by removing the path I could pick up the header and footer files from the skin folder. This suggests to me that the value of rootPath must be missing or incorrect when generating the slides, because the same code works for the index pages.

I hope this makes sense - I am at the limit of my understanding of how Jalbum works!

Stewart
jimberry

Posts: 7,465
Registered: 30-Aug-2004
Re: Global header and footer no longer working on slides
Posted: 13-Jan-2009 17:25   in response to: StewartS in response to: StewartS
 
  Click to reply to this thread Reply
StewartS wrote:
As an experiment, I tried removing '$rootPath/' from the ja:include statements in the slide template, and found that by removing the path I could pick up the header and footer files from the skin folder.
I think the original code expects the header.inc and footer.inc files to be in the "Image directory", not the skins directory. This is so that you can have specific headers and footers for different albums. It is possible to rewrite the code to allow alternative locations for the header/footer, e.g. from Image directory if found, but if not found there, then from the skin directory.
There was a long discussion on this some years back.

Edited by: jimberry on 14-Jan-2009 03:33
StewartS

Posts: 8
Registered: 16-Feb-2007
Re: Global header and footer no longer working on slides
Posted: 13-Jan-2009 19:13   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
I agree the original code expects the header and footer files to be in the image directory. That is what used to work!

Thanks for the link to the previous thread. I'm sure it will help me work around the problem if necessary.

I have inserted some extra code in both slide and index templates to determine the value of rootPath. I then regenerated my gallery using both Jalbum 8.0.9 and 8.1.6. I have found that rootPath gives the value of ".." when generating both indexes and slides using 8.0.9 and indexes using 8.1.6. But it gives the value of "../.." when generating slides using 8.1.6. This means that when generating slides using Jalbum 8.1.6, rootPath is not pointing to 'Path to get back to the top of a multi directory level album', as defined in the Jalbum documentation, but to the level above in the directory structure. This would appear to be a bug in Jalbum rather than ExhibitPlus, but I would appreciate a second opinion. I have checked the other skins installed by default and none of them use rootPath in their slide templates, so this may explain why this issue has not been raised elsewhere before.

Edited by: StewartS on 13-Jan-2009 19:46
John-Simpson

Posts: 291
Registered: 15-Jan-2008
Re: Global header and footer no longer working on slides
Posted: 06-Feb-2009 14:27   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
I absolutely agree with Jim.

If you want something to apply globally you need in INDEX.HTT and SLIDE.HTT to put:

 <ja:include root page="global*.inc"></ja:include> 


Where * is -header or -footer or -news or whatever name you want places the appropriate code or text on every index and slide page.

For example a text file called global-header.inc placed in your root image directory will be generated in all your index and slide pages.

By the way I use global-head.inc to generate a favicon link on every web page. Of course the code below is placed in the HEAD section of INDEX.HTT and SLIDE.HTT

 <ja:include root page="global-head.inc"></ja:include> 


In this case the global-head.inc file has the following text:

<link rel="shortcut icon" href="http://your-webste.jalbum.net/mgb/artwork/favicon.ico" >


Edited by: John-Simpson on 06-Feb-2009 14:29
ccast5206

Posts: 21
Registered: 13-Jun-2007
Re: Global header and footer no longer working on slides
Posted: 19-Apr-2010 20:24   in response to: John-Simpson in response to: John-Simpson
 
  Click to reply to this thread Reply
Thank you for this description. Hopefully I can fix my version of ExhibitPlus as I noticed the styles.inc was no longer being included in slide pages, but was included in all index pages.

This discussion was very helpful. My current published album will hopefully look better with the include problem corrected!

I will try using a global variable rather than depend on the rootPath variable

ccast5206

Posts: 21
Registered: 13-Jun-2007
Re: Global header and footer no longer working on slides
Posted: 20-Apr-2010 04:55   in response to: ccast5206 in response to: ccast5206
 
  Click to reply to this thread Reply
Here is what I did and it seems to be working for me

Where the line was

<ja:include page="$rootPath/styles.inc"></ja:include>

the problem was that $rootPath was equal to "../.." just as stated earlier, making the wrong directory. Since the header, footer and styles were placed in the image directory, replacing the above with the following line

<ja:include page="$imageDirectory/styles.inc"></ja:include>

did what I needed, since $imageDirectory points to where the images and extra files, including styles.inc were placed.

Another option that also worked for me, based on my selection of globalHeader, is to instead, use the line

<ja:include page="<%=globalHeader ? out.print(rootPath):out.print(imageDirectory);%>/styles.inc"><ja:include page="$rootPath/header.inc"></ja:include></ja:include>

and actually the header and footer lines follow that pattern, making the choice of rootPath or imageDirectory based on globalHeader.

So, my included css and header and footer are now working on all pages, indexes and styles.
charleskoz

Posts: 86
Registered: 13-Dec-2010
Re: Global header and footer no longer working on slides
Posted: 12-Apr-2011 06:12   in response to: StewartS in response to: StewartS
 
  Click to reply to this thread Reply
Okay I know this is an old thread on a forum for a skin that will no longer be updated. But I can't find a skin that looks and acts the way ExhibitPlus does, and I've tried and tried to understand what's posted here with no success. I'm hoping someone can help me.

Simply put, I have the same problem as the original poster: a global footer.inc file that shows up on all nested index pages but none of the slides. I've tried different settings, different versions, the suggestions on this page, nothing seems to work. The invocation code to include the footer seems to be the same in index.htt and slide.htt so I don't get why this is happening.

Note that if I turn off global inclusion of the footer in the ExhibitPlus options, this does work. But I don't want to have dozens of copies of the footer to keep track of.

Can anyone help? Thanks. :)

Best regards,

Charles
jimberry

Posts: 7,465
Registered: 30-Aug-2004
Re: Global header and footer no longer working on slides
Posted: 13-Apr-2011 04:34   in response to: charleskoz in response to: charleskoz
 
  Click to reply to this thread Reply
I think that if you replace Mark's code
<ja:include page="<%=globalFooter ? out.print(rootPath):out.print(imageDirectory);%>/footer.inc"><ja:include page="$rootPath/footer.inc"><br></ja:include></ja:include>
with
<ja:include root page="footer.inc" />

the slide pages will then include the footer.inc file from the root Image directory.

(You may want to make the same change in the index.htt for the sake of consistency, even though the old code actually works in index.htt)

Edited by: jimberry on 13-Apr-2011 13:11
jimberry

Posts: 7,465
Registered: 30-Aug-2004
Re: Global header and footer no longer working on slides
Posted: 13-Apr-2011 05:24   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
Some people might want to have the option to replace the footer from the root directory with a different footer for each sub-directory.

If you use this code instead
<ja:include page="footer.inc">
   <ja:include root page="footer.inc" />
</ja:include>
jAlbum will then use the specific footer from the sub-directory if found, otherwise will use the general footer from the root Image directory.
ctwist

Posts: 1,411
Registered: 27-Sep-2003
Re: Global header and footer no longer working on slides
Posted: 04-May-2016 03:44   in response to: StewartS in response to: StewartS
 
  Click to reply to this thread Reply
This is fixed in ExhibitPlus 1.7. Global headers and footers how work as documented at http://exhibitplus.jalbum.net/docs/userreference.html#globalHeader.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums