Search…

X3 Photo Gallery Support Forums

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

Child Pages Inherit Parent Page Settings

29 Nov 2014, 10:56

Another feature request.

It would be nice to be able to specify on a page that the page settings should be inherited by the child pages... superseding site level settings.

This would enable me easily set different banners for the various high level sections of my site. For example... in www.merelyafleshwound.com I could have a mountaineering banner for all of the pages under mountaineering and mountain biking banners for all of the pages under mountain biking.
Alex
https://www.merelyafleshwound.com
https://www.goldenbikeshop.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12248
Joined: 30 Sep 2006, 03:37

Re: Child Pages Inherit Parent Page Settings

30 Nov 2014, 00:30

I need to think about this, because you are a bit ahead of the game here with the settings Alex ...

Also, do you mean inheriting the "content" setting upon child folders? That would of course mean that you couldn't have any unique content for any of the pages unless there was some include option.

Interesting idea, but before I would even be able to plan something like this, we would need to get to a more mature stage in X3 where both the panel- and settings are more intuitive for average users.
 
User avatar
alexhenes
Experienced
Topic Author
Posts: 568
Joined: 28 Sep 2006, 16:13

Re: Child Pages Inherit Parent Page Settings

30 Nov 2014, 11:02

yep... that is what I am referring to. After playing with the site level content settings I definitely like the include vs. default behavior. If the child inherit settings could use include logic... then I could have a default banner for every page... and a description that is unique to each page.... (see Mountaineering Elk Range) making it easy to swap out banners when there is a sale etc.
Alex
https://www.merelyafleshwound.com
https://www.goldenbikeshop.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12248
Joined: 30 Sep 2006, 03:37

Re: Child Pages Inherit Parent Page Settings

03 Dec 2014, 00:19

I'm impressed that you have grasped the X3 logic to such extend at this early stage.

As for inheritance, it would be a nice feature ... The technical challenge, is that it would require each and every page to traverse up its parent structure, reading each page data in search of an "inherit" setting. This is a very inefficient process that would require each page on your website to also "get" parent pages internally just to read their data ... As it works, each page only has to "get" itself and the global-settings to render.
 
User avatar
alexhenes
Experienced
Topic Author
Posts: 568
Joined: 28 Sep 2006, 16:13

Re: Child Pages Inherit Parent Page Settings

03 Dec 2014, 23:44

yep... tough issue to solve.

I am looking for an easy way to have different banners for my major categories and the folders below them. In addition I need to have folder descriptions that are unique for each folder.

It would be high maintenance to specify the banner for each page within the page itself... too much work to update them.

I guess I could always specify the banner within each page... and use the same banner file name when changing banners.

The way things work now I can't really use the default or include.

Using the default will result in my text page description suppressing the banner.

The include will force me to have the same banner for all pages on the site.

I do have scripts that I can fairly easily populate the banner html into each of my existing pages. Moving forward I would put this html into each new page... specifying whatever banner I want for that page.

Let me know if you have any other ideas on the implementation of children inheriting parent includes/defaults... I would prefer not to code the same html into all of my pages... but I completely understand the challenge.
Alex
https://www.merelyafleshwound.com
https://www.goldenbikeshop.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12248
Joined: 30 Sep 2006, 03:37

Re: Child Pages Inherit Parent Page Settings

04 Dec 2014, 01:50

I don't think we would be able to consider page settings inheritance, because there are not really that many uses for, and it would require a lot of processing for each page. However, I could easily conjure up a solution in javascript which would make it easy for you to define banner img based on path segment. You could control it from custom/javascript/ in the panel (coming in 0.6), and it would look something like this:
Code
{
  'Road-Biking': 'banner1.jpg',
  'Mountaineering': 'banner2.jpg'
}
I would probably have to charge you a symbolic fee just because we have to set a base-line.
 
User avatar
alexhenes
Experienced
Topic Author
Posts: 568
Joined: 28 Sep 2006, 16:13

Re: Child Pages Inherit Parent Page Settings

04 Dec 2014, 14:07

cool... lets do it... but first... what do I owe you? and when do we pay for X3?
Alex
https://www.merelyafleshwound.com
https://www.goldenbikeshop.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12248
Joined: 30 Sep 2006, 03:37

Re: Child Pages Inherit Parent Page Settings

05 Dec 2014, 14:09

alexhenes wrote:cool... lets do it...
First, you need to update to v0.6, which has a new custom/javascript/ setting in the panel, where I would add the script and the config.
viewtopic.php?f=53&t=8427
alexhenes wrote:but first... what do I owe you?
Just a formal amount. I will message you PM.
alexhenes wrote:and when do we pay for X3?
As soon as I can get through critical bugs and add a few much-needed features, I will look into that.
 
User avatar
Bulletproof IT
Experienced
Posts: 134
Joined: 04 May 2013, 04:36

Re: Child Pages Inherit Parent Page Settings

15 Dec 2014, 01:16

If it is tough and technical, then do it a different way! Rather than having all the child albums / sub-albums traversing up and looking for settings/configuraiton, reverse it!
If you make changes to 111, then apply changes to ALL album configuration files within each child directory under 111 (which would include: 112, 113, 114, 115....).

So rather than 112, 113, 114... traversing UP to read its configuration, instead they just read their local album configuration file. Only the settings in 111 which you choose to "Apply to Child Albums" would then update that SELECTED setting in child albums. :) (or you could choose "Only override if using default setting" (i.e. if the setting had already been changed) or simply uncheck the "Only overide if using default setting" to apply the setting to ALL albums, sub-albums, sub-sub-albums, and so on...
That way no traversing is required when an album is being loaded! The settings are all maintained and loaded within the configuration file of each folder. LD

Benefit: Not having to modify 101 albums! :D
Disadvantage: Coding a feature similar o X2 :(

Good thinking Alex!

mjau-mjau wrote:As for inheritance, it would be a nice feature ... The technical challenge, is that it would require each and every page to traverse up its parent structure, reading each page data in search of an "inherit" setting. This is a very inefficient process that would require each page on your website to also "get" parent pages internally just to read their data ... As it works, each page only has to "get" itself and the global-settings to render.
» I Imagevue X3 «
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12248
Joined: 30 Sep 2006, 03:37

Re: Child Pages Inherit Parent Page Settings

15 Dec 2014, 03:31

@Bulletproof IT: I really am not sure what you are referring to here. Basically we are talking about a PAGE inheriting settings from a parent. A Page will basically look at it's setting file, check any files inside itself, and then render based on templates ... That's it. If it is to check for the pure existence of a possible setting in a parent setting somewhere up the folder tree, then it has to traverse up the tree on server-side, rendering page settings ...

What specific X2 feature are you referring to? If you are suggesting that parent pages "push" settings into child pages, INSTEAD of child pages "traversing" parent pages, that is just a technical perception ... It does not change the approach or options. Furthermore, it does not make "settings inheritance" something that we can just apply by default, because in most cases you don't want settings to inherit upon children ... titles/data/content/layout etc ...

This was solved effectively for Alex Henes with a custom javascript module we created.
 
User avatar
Bulletproof IT
Experienced
Posts: 134
Joined: 04 May 2013, 04:36

Re: Child Pages Inherit Parent Page Settings

16 Dec 2014, 10:57

Hi @Karl

What part are you unsure about?
I re-read what I wrote in that previous post before I posted it here, to make sure it was clear and included examples.

An Album. = /111/
Sub-Albums = /111/112/, /111/113/, /111/114/, /111/115/, /111/116/,
Or, another example: /Holidays/2010/, /Holidays/2011/, /Holidays/2013/, /Holidays/2015/, /Holidays/Unsorted/....

So I have absolutely no idea why you would make Titles and Descriptions inherited? That is just silly. We are talking about the album configuration and options. *Obviously* we're not going to make certain settings apply down the ladder (hence exceptions), but this is for you to work out. I am simply stating a simple method that would not have the inherent flaws as the method you previously mentioned. You outlined problems with the system a few posts up... refer to your post about these issues... This is what I am responding, offering a work-around.

Important Part: So rather than the album /Holidays/2010/ reading its settings up the chain to the parent YML, i.e.the /Holidays/ to get the configuration for the settings in that child, which point to "/Holidays/YML.Setting.Value", we tell the Parent to apply the selected settings for child albums to inherit (>> /Holidays/2010/YML.Setting.Value). This way that folder just reads the YML in its own folder. No traversing required!

Here is an example. Please remember this is an example and just a way to show you.
Title For Group Of Settings
  • Setting Example: Option1 [X], Option2 [_] , Option3 [X], Option4 [_] ||| Inherit Setting into Sub-Galleries? [_]
  • Another Example: Input Box [_____© Copyright XYZ 2014. All right reserved.____] ||| Inherit Setting into Sub-Galleries? [X]
Upon save, the values which have the X for the inheritance check box will have the setting pushed into the YML files of the sub-folders. But only the items which were checked will be made a "master" setting. For example, some options won't have this as they may conflict with a certain configuration.

The benefit that I am stressing is that you would not have to go into EVERY gallery and EVERY sub-gallery and every sub-sub-gallery... sub-sub-sub-sub-sub-gallery and so on to make changes.
The page settings would be inherited into those sub-albums with the click of a checkbox and save. (with the checkboxes remembering their status when refreshed, and could be easily unchecked if you wanted to change the Parent Gallery and not affect the sub-galleries.

Does that make sense Karl? So NOT ALL options and settings would be allowed to overwrite sub-galleries. I mean you're a smart guy, we're obviously not talking Titles or Descriptions or Meta or anything else that is "gallery specific".

Thanks! :D
» I Imagevue X3 «
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12248
Joined: 30 Sep 2006, 03:37

Re: Child Pages Inherit Parent Page Settings

16 Dec 2014, 11:32

@Bulletproof IT: I understand what you are saying. The general talk here though is about how the page in RUNTIME (frontend) renders itself based on settings. What you are suggesting is an entirely different approach where the PANEL writes settings recursively, instead of settings being truly inherited runtime ... Technically feasible yes, but not very practical neither technically or logical ... For instance, the settings applied is not dynamic. If you apply a setting recursively to 100 folders, there is no "regret" button - The panel just looped through 100 child page setting files and hard hardcoded a setting. To cut the chase here, this is not something we will be looking into in the immediate future. Thanks for all ideas and suggestions though.
 
User avatar
Bulletproof IT
Experienced
Posts: 134
Joined: 04 May 2013, 04:36

Re: Child Pages Inherit Parent Page Settings

16 Dec 2014, 13:30

Thanks Karl :)

Appreciate your feedback.

So what would be a solution for updating numerous gallery (sub-galleries) configurations in "bulk"?
Thanks!
» I Imagevue X3 «
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12248
Joined: 30 Sep 2006, 03:37

Re: Child Pages Inherit Parent Page Settings

16 Dec 2014, 13:46

Bulletproof IT wrote:So what would be a solution for updating numerous gallery (sub-galleries) configurations in "bulk"?
I don't think this is feasible at all ... You already have the settings.page and settings.include settings available from the main settings, which allows you to set default layouts for modules in all pages. Even with Wordpress, developed for years and built on a database, you cannot force settings inheritance.

If you are using an advanced editor like sublime to edit files locally (like I am), you can do simple search-and replace in entire folder sub-sections.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12248
Joined: 30 Sep 2006, 03:37

Re: Child Pages Inherit Parent Page Settings

16 Dec 2014, 13:53

In the future, we might have "blueprints" or "template settings" (in lack of better wording), although this would not really help "push" settings to a selection of child folders. It would however make it easier to update pages that have been applied a specific settings-combo based on a "blueprint" settings-template that is editable.