0
Welcome Guest! Login
0 items Join Now

SOLVED Explain Inheritance to me please

    • Eoin's Avatar
    • Eoin
    • Hero Rocketeer
    • Posts: 424
    • Thanks: 18

    SOLVED Explain Inheritance to me please

    Posted 8 years 7 months ago
    • I like the idea of inheritance, it will save a lot of work.

      My ideal situation is that the footer, header, and menu are all in the base outline.

      Then the other outlines inherit these items as they are almost always the same on the websites I build.

      But when I do this, half of my modules do not appear. Why is this?
    • Last Edit: 8 years 7 months ago by Eoin.
    • Owner of Square Balloon
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Explain Inheritance to me please

    Posted 8 years 7 months ago
    • http://docs.gantry.org/gantry5/configure/inheritance

      If they are "modules" then are those modules assigned to those menu items in module manager?

      If you need more help, Please would you post your URL, superuser id and pswd in the secure tab of your post and i'll have a look for you. Give me a specific example.

      Regards, Mark.
    • The following users have thanked you: Eoin

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Eoin's Avatar
    • Eoin
    • Hero Rocketeer
    • Posts: 424
    • Thanks: 18

    Re: SOLVED Explain Inheritance to me please

    Posted 8 years 7 months ago
    • I have found out what is going wrong I think.

      I was getting a tad confused with things and that is my fault, but now I cannot solve the problem I have caused.

      I start by building the base outline, but then at some point I built some parts in the Home outline. Then I realised I could make them work for other outlines too, so I decided to add them to the base outline.

      So home was inheriting some things from the base outline, but home was also more detailed. So I decided to load the home outline into the base outline.

      Now some of the base outline is inheriting from the base outline. If I change it, the problem is not resolved it reverts back to inheriting from the base outline. I cannot add new modules, they add, and they save, but when I switch to the home template and then back again, it is broken again. So whilst it looks like inheritance is not working, it is more a case of I can't save it and I can't work out how to get it back to a state where I can save it.
    • Last Edit: 8 years 7 months ago by Eoin.
    • Owner of Square Balloon
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Explain Inheritance to me please

    Posted 8 years 7 months ago
    • base outline can't inherit anything? especially not from itself.

      Please would you post your URL, superuser id and pswd in the secure tab of your post and i'll have a look for you.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Eoin's Avatar
    • Eoin
    • Hero Rocketeer
    • Posts: 424
    • Thanks: 18

    Re: SOLVED Explain Inheritance to me please

    Posted 8 years 7 months ago
    • Funnily enough I think I have copied the outline to base in the past and it copied the inheritance. Now I understand the error. It definitely can't inherit from it's self haha.

      If you can let me know how to resolve it whenever you work out how to do so that would be awesome.

      Thanks for your help.
    • Owner of Square Balloon
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Explain Inheritance to me please

    Posted 8 years 7 months ago
    • Ok I think I've repaired the base outline for you. I notice that you seem to have copied the template and given it your own name? (not a good idea really) You template is out of date now on v1.0.2 and interstellar is now on v1.0.3 so you will need to update that.

      I'd love to know how you managed that? It should not be possible to do that but clearly you managed it :)

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Eoin's Avatar
    • Eoin
    • Hero Rocketeer
    • Posts: 424
    • Thanks: 18

    Re: SOLVED Explain Inheritance to me please

    Posted 8 years 7 months ago
    • Yeah, I see your point, but the updates are not so frequent so not a huge issue, although it would be cool if Gantry could find a way to link the templates even with the name change (using an ID or something). It's quite a lot of dev work to change the name of a template, probably way over your head, only a super dev like me could achieve such a thing really, I'd explain it to you, but it would take too long.

      docs.gantry.org/gantry5/theme-development/change-theme-name
      p.s. Takes 5 minutes with Sublime Text

      How did you fix the issue I caused?
    • Last Edit: 8 years 7 months ago by Eoin.
    • Owner of Square Balloon
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Explain Inheritance to me please

    Posted 8 years 7 months ago
    • Wow it seems I offended you in some way as you felt the need to make those comments?

      I am fully aware of the procedure to rename a template but the downside is that you will find it harder to keep things up to date - that was all I was saying.

      I went into the inheritance section of each particle on the base outline and remove the two last ticks tell it to inherit block and attributes and saved.

      I'd still like to know how you managed to do that please so I can raise a bug ticket to prevent it in the future. A step-by-step would be helpful please.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Eoin's Avatar
    • Eoin
    • Hero Rocketeer
    • Posts: 424
    • Thanks: 18

    Re: SOLVED Explain Inheritance to me please

    Posted 8 years 7 months ago
    • Sorry I meant it in the dryest possible way (not serious). I'm in no way shape or form a developer, sorry if that didn't come across. I was being overly dramatic, but it was meant as "even I could manage it". I'm entirely grateful for your help.

      I have updated the most recent template files, it took me a few minutes but the changelog documents changed files well so it actually wasn't too much of an issue. I also realised that if I don't find/replace everything I might avoid this issue in the future, the XML file has the update server on it. It might crash because of my renaming of things.

      The process I did to cause the "bug" (user error) was.

      1. Set the base outline header/footer/copyright.
      2. Set the home outline to inherit these positions from the base outline.
      3. Go to base outline, load the home outline including all modules/particles
      That probably caused it, but afterwards I also

      4. Go to the home outline and inherit from the base Outline
      5. Go to the base outline, and it's not possible to add new modules (at least they never save).
    • Owner of Square Balloon
    • Eoin's Avatar
    • Eoin
    • Hero Rocketeer
    • Posts: 424
    • Thanks: 18

    Re: SOLVED Explain Inheritance to me please

    Posted 8 years 7 months ago
    • My inheritance still says it's from the base outline and I cannot add new modules/particles. It just keeps reverting back to base outline. Perhaps there is a YAML file I can edit?
    • Owner of Square Balloon

Time to create page: 0.074 seconds