template transclusion

Jump to: navigation, search

hola, the Template:Occupy_Portland_Event you made is very cool. i have one thing i'd like to make better for other users.

i gave each event its own page, and am transcluding some events on OccupyPortlandEvents. But, since those events are now using your template, when a person clicks the "improve" button next to the event - it takes them to editing the template not the event content.

i've found this page about the issue, but can't figure out the best approach.

Some options might be:

  • use __NOEDITSECTION__ to suppress the improve button
  • add a link to the transcluded page in the template.
    • would {PAGENAME} do that? if so: where would that link go?
      • could the the title by a link to the page?
      • could there be a boxed section at the end of the template with the words "the events page"?
      •  ??
  • remove the header from the template, and force people to manually put a header/title on the event's page. this header would wind up appearing above/outside of the template's box, perhaps the template could always say "Details" as its first item ( would look like "Purpose" does ). the downside is on the page itself you'd see the page name immediately followed by the header; might look a little messy.

Of all of them, i think i like the last one best, but wanted to see what you thought first.

Ios (talk)09:39, 3 November 2011

I see the issue... thanks for bringing it up! I didn't quite understand all your options, but I've been trying to replace the "improve" link with one that works. You can see my attempts in the Template:Occupy Portland Event history. My attempt successfully created an edit link... to the OccupyPortlandEvents page (not the transcluded single-event page). Obviously not good enough, so I removed it. I have to take a friend to the hospital now but I'll give it another shot when I get back in a few hours. In the meantime, by all means if you want to give it a shot, feel free. The transclusion is confusing the issue a little but there may be a way to link to the transcluded page that I haven't found yet.

kotra (talk)10:31, 3 November 2011

Also, I made you an administrator so you can edit templates (if you couldn't already).

kotra (talk)10:32, 3 November 2011

Thanks Simon for working on fixing the edit link on Template:Occupy Portland Event, and sorry for not getting back to this sooner! It looks like you've come to the same conclusion I have: that automatically linking to the transcluded page is impossible (confirmation from one of the developers here). I saw that you added another field to the template ("page"), which allows the editor to hardcode the page name, allowing an edit link to come up. Thanks for doing that! Though it's an imperfect solution, it's the best one I've been able to think of too. Do you mind if I take that edit link and tweak it so it looks like one of the "[improve]" links beside section headers? You're the main person who uses the template so I'll defer to your preference.

Thanks again for working on this.

kotra (talk)21:22, 7 November 2011

kotra: sorry for forgetting to send you a heads-up that i had changed the template to include that link. you're right it's not a perfect solution, but yeah: seems like it may be our best option. you're more welcome to change it to look more like "Improve". ( Mark, I think, changed the language of the generated link slightly already. ) I just wanted *something* in there to be able to jump to the page...

I think the template really improves the look of the events. It definitely seems like a win!

Ios (talk)15:22, 8 November 2011

No problem Simon, and thanks! I just added the [improve] link, leaving the old edit link alone.

kotra (talk)19:49, 9 November 2011

looks great!

Ios (talk)23:54, 9 November 2011