Fork me on GitHub
Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
Critical: Update to 2.1.8, released 15 Jan.

Name conflicts in theming?

LincLinc Community InstigatorDetroit Vanilla Staff
edited January 2010 in Vanilla 2.0 Help
The theming README says:
if you wanted to edit the html for the discussion list, you could
copy the views from /applications/vanilla/views/discussions to
/themes/yourtheme/views/discussions and edit them there.

Doesn't that create a huge potential for naming conflicts? For instance, both Garden and Vanilla have a /views/settings folder, so what happens if I create /themes/yourtheme/views/settings/index.php? Does it overwrite both of them? Am I misunderstanding this, or does every views subfolder have to be uniquely named between every potential app for theming purposes?

Sr Developer at Vanilla Forums, humble servant of Lord Brackos, & pro smatcher. [GitHub, Twitter]

Comments

  • as far as I can tell, if you have an index.php within your theme, it will be used instead of the default one,
    eg, /applications/vanilla/views/settings/index.php would be the default if there isnt a version in /yourtheme/
    if there is a /themes/yourtheme/views/settings/index.php it will be used instead,
    seems to be the same as the way wordpress or zencart or whatever, works,
    it should always look for the relevant index.php within /yourtheme/
    doubling up on index.php files should be fine aslong as they are within a designated /yourtheme/ folder, and shouldnt cause any issues

    I think I'v understood your question, if not, nevermind what I'v just said lol
  • lucluc ✭✭
    edited January 2010
    What Lincoln says is that there is not just 1 application for a garden/vanilla2 setup, most of the time, 3 are installed and enabled (garden/vanilla2 and conversation). So if you've got an view/settings/index in your theme, it might replaces all 3, but it will have been coded for just one of those.

    That's, indeed, something to look into. It might be already taken care of, I don't know.
  • lucluc ✭✭
    Well, apparently, it's taken care of (Readme.txt from applications/skeleton):

    If you want a view to be used across applications (ie. one master view for
    vanilla, scffolding, etc), you could place it in:

    /themes/theme_name/views/default.master
    /themes/theme_name/design/*.png,*.css

    If you wanted a view to be specific to one application (ie. an altered master
    view for scaffolding only), you could place it in:

    /themes/theme_name/app_name/views/default.master
    /themes/theme_name/app_name/design/*.png,*.css


    Maybe it needs to rephrased in the themes documentation (I haven't been around to go and read it again).
  • LincLinc Community Instigator Detroit Vanilla Staff
    Oh, cool. Yeah, it definitely doesn't say that in the theming Readme or the theming documentation here. Thanks @bean

    Sr Developer at Vanilla Forums, humble servant of Lord Brackos, & pro smatcher. [GitHub, Twitter]

  • MarkMark Vanilla Staff
    Whoops - That reminds me - does anyone want access to editing the documentation here on the documentation wiki? @Lincoln? @Bean?
  • LincLinc Community Instigator Detroit Vanilla Staff
    In! Any guidance before letting me loose? ;)

    Sr Developer at Vanilla Forums, humble servant of Lord Brackos, & pro smatcher. [GitHub, Twitter]

  • lucluc ✭✭
    I'm not a native english speaker, I don't want to write stuff that will mislead readers :).

    And I'm learning php at the same time that I learn garden, so I'm not sure to be able to write definitive stuff, especially documentation.

    Thanks for the offer though.
  • LincLinc Community Instigator Detroit Vanilla Staff
    @bean, if it's any consolation, you're more fluent than many native speakers. ;)

    Sr Developer at Vanilla Forums, humble servant of Lord Brackos, & pro smatcher. [GitHub, Twitter]

  • lucluc ✭✭
    Yep, I know that, thanks.

    Reading book in english since 18 y.o, and 2 years in London when I was 30ish would do that to you.
Sign In or Register to comment.