I plan to make a content management system.
System composition:
- The page tree by category. (Page tree by category);
- Web browser. (webbrowser);
Contents of the pages:
- formatted text;
- Pictures;
- references;
Text in HTML format is stored in the database.
The category tree displays text from the database to the Web browser.
It is necessary to make a transition between pages.
That is, the transition from page "Page_1" to the necessary paragraph of the page "Page_2"
Logics:
- User. It is on page "Page_1".
- User. Click the link on the page "Page_1".
- Browser. Opens the page "Page_2", scrolls to "Paragraph_N" ("N" depends on which paragraph on the page is "Page_1")
The transition between the pages I plan to do with links "anchor"
<a href="text.html#bottom"> Go to the bottom of the text </a>
I think that to perform this logic, need the application to do the following:
- track the event "clicking on the link";
- Extract from the link the name of the page ("text.html") referenced by the link;
- extract the page from the database according to the name;
Example HTML code "Page1" and "Page 2"
https://codeshare.io/2Bb03L
Questions
1. How do I get the link attributes (page name) in the "Webbrowser" event when I click a link?
2. What are the more rational ways to perform this logic (go from page "Page_1" to page "Page_2")?
3.0 How to make the following actions when the link is clicked:
3.1. If the link to the site - open in Chrome?
3.2. If the link to the page from the database - open in "webBrowser1"?
3.3. If the link to the paragraph of pages from the database - open in
"webBrowser1" and scroll the scroll to the desired paragraph?
image