Author Topic: PDF files on container pages  (Read 4954 times)

Offline hidden

  • Auxilary Member
  • *
  • Posts: 24
PDF files on container pages
« on: January 07, 2010, 09:40:30 AM »
I want to put some PDF files on my site. Users should be able to view them and navigate to links in them. It would also be good to if they could print and save them. The material in the PDF files changes from time to time, so I need to be able to upload new versions. I've got everything working, but I can't figure out how to upload new versions.

An example is at http://www.allmilitaryreunions.org/id69.htm, which is a container page. I got the contents of the page in a roundabout way, but it works. (I can tell you the way if you need me to.) The problem is that when I use an FTP program to replace the PDF file with a new one, the site doesn't show the new file.

Trying to do the same thing in a more standard way, I set up a container page at http://www.allmilitaryreunions.org/pester.htm. When I set up the container page, I told it that the contents was a PDF file on my desktop. The PDF file shows up fine on the container page in CSB, but when it's published, the page is blank.

I'm not at all experienced in using container pages, so there's a chance I'm missing something simple.

What I want to do is to be able to show a page like http://www.allmilitaryreunions.org/id69.htm, and to update the contents from time to time.

Offline hidden

  • Expert Member
  • Senior Member
  • *****
  • Posts: 1348
  • LaughLots
Re: PDF files on container pages
« Reply #1 on: January 07, 2010, 05:50:43 PM »
The way I inderstand it, is that CSB creates its own object URL for an inserted pdf, so it will only show up if you FTP to exactly the same URL created by CSB and you may have to refresh you browser page too.

Sami can correct me if I'm wrong but e.g. your URL is "h**p://www.allmilitaryreunions.org/HTMLobj-258/ReunionNotices2.pdf" and the new pdf must have exactly the same correct characteristics (same URL and file name, dimensions, etc.) to show in a browser. CSB creates the "/HTMLobj-258/" part of your URL, and it will create a new one every time you add and new pdf object, even if it is in the same page.

If you delete the old pdf object in your CSB page, and then add the new pdf in your CSB page, and then publish from CSB, it will work without having to FTP. I like FTP'ing but everytime one FTP's what is published goes out of sync with your CSB tlx file.

There are also other ways, like adding a javascript or software that updates an inframe for example.
:dogwalksm: Ed

Offline hidden

  • Sami
  • Administrator
  • Senior Member
  • *****
  • Posts: 5924
  • Not a geek. Just a Nerd.
    • CSB Tutorials
Re: PDF files on container pages
« Reply #2 on: January 07, 2010, 06:25:08 PM »
Ed is totally right that CSB creates that folder for you and SHOULD upload the file to the server for you.

But there is a GLITCH in the publish for CSB 4 and 5 for uploadable items.When you PUBLISH, remember to UNCHECK the option to publish to a local HTML file if you have defined it in the publishing options. If you do that, your HTML-obj or resource folder will publish fine.   [This box is helpful as a setting for previewing your site, but not for publishing your site!]
    File > Publish web site > Options > HTML Directory > Uncheck this box when you publish. If you leave it checked when you publish, CSB can actually cause files to be REMOVED from your site!
 You can easily recheck it again when you want to use the preview function again.
(also applies to options #1 and #3 below)

And Ed was right that there are several ways to provide PDF documents on a website.  
Personally I am not a fan of container pages for these types of files and would not recommend them for your purpose.  There are MANY ways you can provide PDF documents for your visitors. Depends on how often you want to maintain them, how big they are, how you want your visitors to see the files.


4 WAYS TO have a downloadable PDF file: Many people stick with #1 or #2.
1) USE THE INSERT > FILE DOWNLOAD LINK (in Trellix it's the webgem for file download) Choose your file and publish.  Simple, clean, quick.
LINK STYLE: regular text or image link
LINK OPENS: can only open in same window, replacing content of current window.
CSB uploads file, and file content is added to tlx design file. (see note 1 below)
(not YOUR best option)

2) USE FTP (or file manager at host) TO UPLOAD A FILE: When you use a 3rd party FTP program to upload your special files (swf, music, pdf, image for slideshows, etc) you can place them into folders on your website that mean something logical if you like. You can place all your pdf files in a pdf folder, or separate them by topic, etc. Then in your CSB page, simply link to them either from a web page with a simple link (use URL style link) or from a script, just use a full URL address.  EX: http://www.samisite.com/external/web_designer_features.pdf
LINK STYLE: regular text or image link
LINK OPENS: 4 choices here.
   A - open in same window, set target to top
   B - open in new window, set target to blank
   C - open within a frame, if the TLX file is published with frames "on", set target to TRLX_Middle
   D - open within an iframe (great for some files, but not best for PDF).
Best option if you have A LOT of files or you need to change them out often, or you want to keep your tlx file small.  This also allows your visitor to download the file to their own computer by right clicking the link if they so choose.  I have used open B most to set all links to open in NEW window so no matter which browser or resolution they use, they can see the file well and yet still stay on the main link page.

3) USE CSB/TRELLIX TO UPLOAD A FILE AS PART OF A CODE: (usually this instruction is for FLASH .swf or image files for slideshows, etc) When you use CSB/Trellix to upload and link to a file (swf, music, pdf, image) as part of a code, you place the code into an INSERT HTML, then place the file into the WEB COMPONENTS part of the insert HTML. To find the file, the code must be modified to put ^GEMDIR/ in front of the file name.
RESULT: CSB/Trellix publishes the code AND your file to your website.
ADDITIONAL INFO: You should look at the VIEW SOURCE on the page with the code. You will not see ^GEMDIR/ in the code. That is placed into your code to tell CSB/Trellix to create a SUBDIRECTORY to hold that webcomponent. The source code on the page will show the swf file can be located at an address that looks like HTMLobj-123/yourfile.swf   (see note 1 below)
LINKING: If you want to link to the file from somewhere else on your site, or as part of another script, you would have to use the true URL address to link to the file, example: http://www.domain.com/HTMLobj-123/yourfile.swf You would NEVER use the ^GEMDIR/ outside of the confined space of the CSB INSERT HTML interface! To link from one Insert HTML to another is tricky but can be done. Insert the swf file. Publish. Using the View source get the proper url address of the swf file. Then when you put your other code in you can use the true address of the swf file in the code. You use ^GEMDIR/ for the files that are inserted only into the CURRENT insert HTML code.

4) CONTAINER PAGE.  Basically you can use CSB to store and upload all kinds of files to your site (as if it is an FTP program).  Then they can appear inside a frame (usually a header to match the site).  A sample to build a container page is on KW's website here.. His sample uses a pedigree HTML page, but it could have been a pdf file, image or other type of document. Concept and instruction is still the same.
CSB uploads file, and file content is added to tlx design file.(see note 1 below)
(not YOUR best option)


In my opinion, you should use option #2.  
A framed page could be set have the PDF files open inside the middle frame but I choose not to do that. Did not want my customers getting confused and closing the window by accident and going off the site so I cause new windows to open.
If you do want a container look just set your tlx file to use frames and open links in the middle.
Option #2 is most versatile.



Note 1: YES....YOU CAN put all your zip or pdf, or other files into your website with this then use a URL style link to link. No FTP software is really needed. BUT putting a bunch of big files into your CSB file will bloat it and could in the long run cause problems with publishing....
« Last Edit: April 18, 2010, 11:03:52 AM by Samrc »
-Samantha
TNG: "Sometimes, you can make no mistakes, do everything right, and still lose" - Capt Picard to Data
(:turtle: In memory of Turtle: May 22, 1944 - Nov 24, 2007  GURU, mentor, and really nice guy! :turtleleft: )

Offline hidden

  • Auxilary Member
  • *
  • Posts: 24
Re: PDF files on container pages
« Reply #3 on: January 10, 2010, 11:51:48 PM »
Thanks for all the advice and info! I think my problem is solved.

I wanted my stuff to go into a container page, so users would experience it the same way as they experience the other links at http://www.allmilitaryreunions.org/calendar.htm. (Mine are the two Alliance links. The "others" are the links below them on the page.)

I used FTP to upload my two PDF files to a special folder on my site. Then I made a container page for each of them, each container page pointing to its own file.

Now, or at least so it seems, I can update the contents of the two container pages by FTPing updated PDF files to that special folder. The container page doesn't know anything is changed, since it's just looking for a URL on the web.

Offline hidden

  • Sami
  • Administrator
  • Senior Member
  • *****
  • Posts: 5924
  • Not a geek. Just a Nerd.
    • CSB Tutorials
Re: PDF files on container pages
« Reply #4 on: January 11, 2010, 07:34:28 PM »
Excellent. 
Two things I really like about CSB that I will miss when I move away: versatility and flexibility.
More than one way to accomplish a task.
-Samantha
TNG: "Sometimes, you can make no mistakes, do everything right, and still lose" - Capt Picard to Data
(:turtle: In memory of Turtle: May 22, 1944 - Nov 24, 2007  GURU, mentor, and really nice guy! :turtleleft: )

Offline hidden

  • Auxilary Member
  • *
  • Posts: 24
Re: PDF files on container pages
« Reply #5 on: January 20, 2010, 10:47:04 AM »
I never cease to be amazed at the highly advanced nature of this program that has its origins long, long ago. Or at its ease of use, once you learn some basics. The guy who developed Trellix (famous, but I've forgotten his name right now) truly is a creative genius.

Offline hidden

  • Sami
  • Administrator
  • Senior Member
  • *****
  • Posts: 5924
  • Not a geek. Just a Nerd.
    • CSB Tutorials
Re: PDF files on container pages
« Reply #6 on: February 19, 2010, 06:19:05 PM »
Dan Bricklin was so far ahead of his time when he created Trellix. 
His concepts, his program remains special with its abilities.
So sad to see it not continue.
-Samantha
TNG: "Sometimes, you can make no mistakes, do everything right, and still lose" - Capt Picard to Data
(:turtle: In memory of Turtle: May 22, 1944 - Nov 24, 2007  GURU, mentor, and really nice guy! :turtleleft: )