Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
alexhenes
Experienced
Topic Author
Posts: 568
Joined: 28 Sep 2006, 16:13

Displaying HTML & Other Media Types

21 Nov 2014, 00:38

In X2 I have links to internal html files, pdf files, etc that open in new browser tab. In X3 I would like to have these links in the mega menu and have the html or pdf load in the same area that a gallery loads. Any suggestions on how to do this?

Thanks
Alex
https://www.merelyafleshwound.com
https://www.goldenbikeshop.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14469
Joined: 30 Sep 2006, 03:37

Re: Displaying HTML & Other Media Types

21 Nov 2014, 00:56

This question has two answers ...
alexhenes wrote:In X2 I have links to internal html files that open in new browser tab. In X3 I would like to have these links in the mega menu
Not currently possible to add custom links, but I can add a method similar to X2, where you "create page" and simply use it as placeholder for a link.
alexhenes wrote:... and have the html load in the same area that a gallery loads. Any suggestions on how to do this?
If you are going to load the html into the main content area, then why not just add the html content into the page's content instead of using an external html file for it? What are these external html used for so they cannot be added as integrated X3 pages? You can't just load the external html file "into" the X3 content section, first of all because it is not part of the X3 content structure, does not compile- or comply with X3 templates, and will normally contain a full html page including <head> and <body> tags that can't just be added into another page. At best, it could be loaded within an iframe ...

Actually, we could offer a system where you contain the html file within the folder, and it would read the html and display its content in the page. I don't see the benefit of this though, as you could just add the same html content to the page's content setting ..

Also, just for reference, you can list html files in a page just like you can list gallery images (although without preview image obviously). Not sure what this would be used for though ...
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14469
Joined: 30 Sep 2006, 03:37

Re: Displaying HTML & Other Media Types

21 Nov 2014, 01:00

Just saw the reference to PDF after I wrote the reply above, which may constitute for a variation to the answer ...

You could employ the same technique as I suggested above for adding any links (including PDF) to the main menu:
mjau-mjau wrote:Not currently possible to add custom links, but I can add a method similar to X2, where you "create page" and simply use it as placeholder for a link.
The PDF would normally need to open in a new window though ... At best, we could attempt to load the PDF inside an iframe. However, far from all browsers are capable of displaying PDF's directly in the browser, and some would be prompted to download the file instead ...
 
User avatar
alexhenes
Experienced
Topic Author
Posts: 568
Joined: 28 Sep 2006, 16:13

Re: Displaying HTML & Other Media Types

24 Nov 2014, 19:35

I like the option of using a X3 page as a holder for the link and have the link open in another tab.

I have html files that...

1. Are formatted articles with images
2. Tables that reference JS for column sorting
Alex
https://www.merelyafleshwound.com
https://www.goldenbikeshop.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14469
Joined: 30 Sep 2006, 03:37

Re: Displaying HTML & Other Media Types

24 Nov 2014, 23:49

alexhenes wrote:I like the option of using a X3 page as a holder for the link and have the link open in another tab.

I have html files that...

1. Are formatted articles with images
2. Tables that reference JS for column sorting
You mean you want to add links to the html files from the main menu? ... or you want to create a list of links to your html files from within a page?

The latter could be achieved automatically by listing the html files within a folder just like a gallery lists image files. However, I assume you mean from the main menu? That would be a manual task of creating a page for each html, and populating a new link setting. In fact, I would appreciate if you could add the specific request to the Features Forum, so I can track it properly.