| Summary: | Add TopicID to each output page | ||
|---|---|---|---|
| Product: | [Community] PressGang CCMS | Reporter: | Joshua Wulf <jwulf> |
| Component: | Web-UI | Assignee: | Matthew Casperson <mcaspers> |
| Status: | CLOSED NOTABUG | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.x | CC: | cbredesen, lcarlon, topic-tool-list |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-05-11 05:46:57 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Joshua Wulf
2011-05-05 04:05:54 UTC
Done. Sorry, to clarify:
This should not be in the title of the section.
Try this:
inject the following line immediately following the topic <section><title/>:
<para><literal>ID: [[Topic.ID]]</literal></para>
So the output will look like this:
====================================
Add a new Path in Standalone Mode
ID: 3875
Prerequisites
You must meet the following conditions before continuing with this task:
*
You must be able to login to the JBoss AS7 Console with an administrator account.
...etc...
====================================
Ideally we should inject the TopicID at the end of the topic. To do this, you'd need to go the last </section> tag, then check the tag before that, if it is a </section> tag, then go back to that, repeat until you reach a tag before a </section> that is not </section>, this means it is safe to insert the text without breaking the build by following a section with a non-section, then insert:
<para><literal>ID: [[Topic.ID]]</literal></para>
This will put the Topic ID at the end.
The Topic ID there is an internal thing, and might be removed in production. Certainly we do not want it to be an obtrusive feature either internally or in production. It is for reference, so that we can know which topic we are looking at in the output. It doesn't need to call attention to itself, it just needs to be there.
Done Too loud. Subtle, like this: <para> Report a bug: <ulink url="https://bugzilla.redhat.com/enter_bug.cgi?product=Topic+Tool&component=web-Topic_Index&comment=Leave%20this%20line%20in%20the%20report.%20Topic%20ID:4092">4092</ulink> </para> "Report a bug" has to be a section if it is going to appear at the end of the topic. Adding a para to a topic that is a section with child sections (like the overview topics) will break docbook validation. A section with an empty title is the best workaround for this. A section plays a particular role in formatting the information visually, one that is incompatible with the role of the topic id/bug reporting link.
I'm not sure what tools you have at your disposal while you're building this, but here's some BASIC-style pseudocode that could do it:
LOOP:
Is this tag </section>?
YES: walk backwards. GOTO LOOP
NO: Is it </somethingelse>?
YES: immediately after it write <para>[bugzilla_link]</para>. END
Is that possible?
We really can't have the bugzilla link in a section.
LOOP:
Is this tag </section>?
YES: walk backwards. GOTO LOOP
NO: Is it </somethingelse>?
YES: immediately after it write <para>[bugzilla_link]</para>. END
NO: did I reach the beginning of the document yet?
YES: this topic has only one section. Write it before the </section> tag. END
NO: GOTO LOOP
This is getting too complicated. If a section is not to be used for displaying links at the end of a topic, then topics need to be redesigned not to used child sections. |