I have a mermaid websequence diagram snippet in jekyll blog
```mermaid
sequenceDiagram
actor User
participant ABC
User->>ABC: Hello <-- i want this to be a hyperlink to a section on the same page
i tried this, but doesn't work
```mermaid
sequenceDiagram
actor User
participant ABC
User->>ABC: <a href=#somelink>Hello</a>
it shows the entire text as is, without converting the text Hello to a link.
There is an open issue on GitHub for this. So this feature seems not available for now. https://github.com/mermaid-js/mermaid/issues/1279
Related
Building a site which shows users profiles. When changing from one profile to another, the profile description is getting stuck with the previous users profile data.
For example
Visit users profile 1
Users profile description reads User profile 1 description
Visit users profile 2
Users profile description reads User profile 1 description User profile 2 description
My code is all being run in the render function of my component so should be rerendering when state updates.
render(){
return(
<h4>Profile 1<h4>
<p dangerouslySetInnerHTML={{__html: this.props.profile.description}} />
)
}
Turns out this.props.profile.description was HTML wrapped in <p> tags. This was causing p tags to be nested within p tags which causes issues as described in this post - Nesting <p> won't work while nesting <div> will?
Rule of thumb is never use dangerouslySetInnerHTML on a <p> tag.
Took me a long time to get to the root cause of this and thought it was worth passing it on.
I'd like to make a table of content for this web page I am making (the project is still offline for the time being).
Now I already know most of what I have to do (text boxes, lists, the CSS, etc) however I don't want the links going to new pages but rather it send the user to certain parts of the page like in a wiki.
Any idea on how one would code something like that?
Like this:
Jump to a section
Then in the location to jump to:
<a name="jump"></a>
You can use anchor link (or bookmarks)
The code will be:
<a href="#my-div>Link to 'my div'</a>
<div id="my-div"></div>
That link will scroll the page until the element with the corresponding ID
Let me assume that I have the following architecture
_components (folders)
x1.html
x2.html
x3.html
I have a first page where I got the information from the YAM section for every component.
At this point I would like to add a link for every component to another page where I will display the component in a bigger manner.
So, let me assume I have, in the first page :
<div class="col-md-1">
<span id= "logos" class="material-icons"></span>
</div>
and In the componentbig.html I would like to open the right component on the basis of the link.
Do you have any suggestions for me ?
If I understand You correctly, then collections might be the feature You are looking for. For example, I'm usually using collections to generate a list of products and then have a specific page for each product also. Also make sure You check the easy tutorial by Ben Balter.
I'd like to make the database of famous musicians using dokuwiki.
Musician has their own Biography, Discography, Members, and Live Concert Info.
For example, Aero Smith. They have many CD released. and historical events.
So does Live Concert Info.
That's why basically I'd like to make all the page separated something like this.
Aero Smith (Main Page of Aero Smith)
Biography
Discograhy
Members
Live Concert Info
I was talking about only Aero Smith. But there will be other famous musicians, too just like this.
Red Hot Chilli Peppers (Main Page of Red Hot Chilli Peppers)
Biography
Discograhy
Members
Live Concert Info
So each band should have 5 pages for total including Main Page.
Then here's my question.
Is it possible to let these 5 pages have the same menu which has links to other pages?
For example, I want the Table of Contents(or Side Menu) which has link to these
Main Page(of Aero Smith)
Biography(of Aero Smith)
Discograhy(of Aero Smith)
Members(of Aero Smith)
Live Concert Info(of Aero Smith)
Of course, this will be shown only in Aero Smith's content page.
In other musician's page, their menu will be shown up just like "Main Page(of Red Hot Chilli Peppers)"
and one more thing. I want this "Table of Contents(or Side Menu)" just as menu for links to the other pages.
I don't need the same name header in a page. All I want it is only for the links to the other pages.
I just want it as menu that indicates links.
Are they possible with dokuwiki? or Is there any other wiki that can make all of these possible?
HUSTEN, you can certainly do this following the guidelines for creating Namespace Templates and placing 'relative' links in the template in order to link to the sub-pages. (See the 'aside' below in regard to namespace/page naming.)
Place the following markup into your page named: bands:aerosmith:main
Menu: [[.:main | Main Page]] [[.:discography | Discography]] [[.:members | Members]] [[.:live | Live Concerts]]
Note the use of .: in the links to create 'relative' links to the current namespace. See DokuWiki Namespaces
You may also want to add any common headings or sections into this page as well as the menu links (as this will be your template).
Now follow the instructions on the Namespace Templates page to copy /bands/aerosmith/main.txt to /bands/__template.txt (note the double underscores which will make the template apply to all sub-namespaces within the 'bands' namespace).
Now, whenever you create another band page, such as bands:red-hot-chilli-peppers:main, it will automatically be populated with this menu of links to the other pages (and you have the benefit of just clicking the link in order to create the page).
A brief 'aside' in regards to DokuWiki pages and namespaces:
If you create a new 'page' named bands:aerosmith
then you end up with a Namespace named 'bands' which contains a Page named 'aerosmith.txt'
But if you create a new 'page' named (note the trailing colon) bands:aerosmith:
then you end up with a Namespace named 'bands' containing another Namespace named 'aerosmith' which contains a Page named 'start.txt' (if you haven't changed the default page name in the configmanager).
So, if you use my instructions above, you will end up with a Namespace named 'bands' and a Namespace named 'aerosmith' and a Page named 'main.txt'. BUT you do not have a page named 'start.txt' so if you attempt to browse to /bands/aerosmith then you won't see the 'main' page as it will (by default) attempt to show you the 'start' page in that namespace.
I am using ExpressionEngine 2.2.1 and am trying to create a conditional that will cause a page to show a specific navigation template based on the page's category. For example, I am creating a public profile for someone who is a part of a competition in London. When someone visits his profile, I would like the page to show, not only his profile, but also a banner with an image of London & navigation that is specific to the London competition. I would like to do this by adding a conditional with categories since we have so many competitors in many different cities. I have created a category titled "London Competitors English" and it has the ID of "56". Once I have created the competitor's profile within EE, I select the category, "London Competitors English," however, when I go to the page, the default navigation template is loading rather than the London template. I created code based on my research and most related example here: http://expressionengine.com/forums/viewthread/185555/. What do I have wrong in my code?:
FILE ONE: (condensed portion of) competitor_profiles_en/index.html where "competitor_profiles_en" is the template:
{exp:channel:entries limit="1" url_title={segment_2} }
{embed="includes/header"}
<div class="xx">
<h2>{competitor_first_name}<br>{competitor_last_name}</h2>
...
</div>
{/exp:channel:entries}
FILE TWO: (condensed portion of) my header.html file :
{if segment_1 == 'home'}
{embed="includes/_nav_landing"}
{if:elseif "{categories}{category_id}{/categories}" == "56"}
{embed="includes/_nav_city_lon_en"}
{if:else}
{embed="includes/_nav_internal"}
{/if}
The problem is that embeds are processed after all other tags, in a completely separate process. So when your includes/header embed runs, it has no categories to speak of, because it's not actually running within a Channel Entries tag.
Unless you need to pass variables to includes/header (which you don't appear to be doing here, but you may have removed that for simplicity), I'd move your includes/header to a snippet instead, so it will be processed inline with your Channel Entries tag.
Derek's answer was spot on, and I would like to elaborate on my method of putting his suggestion into action.
I found information about snippets here http://expressionengine.com/user_guide/templates/globals/snippets.html and watched this tutorial here http://www.youtube.com/watch?v=AEEudo0BrRA&feature=related. I then created a snippet within the control panel (Design > Templates > Snippets) that included all of the code that was in the header file and titled it snippet_header_en. Because ExpressionEngine includes snippets as a part of the template that they are in, EE recognized my conditional including the categories that I created. Here is the revised code:
FILE ONE: (condensed portion of) competitor_profiles_en/index.html where "competitor_profiles_en" is the template:
{exp:channel:entries limit="1" url_title={segment_2} }
{snippet_header_en}
<div class="xx">
<h2>{competitor_first_name}<br>{competitor_last_name}</h2>
...
</div>
{/exp:channel:entries}
FILE TWO: (condensed portion of) my header.html file :
As previously mentioned, I moved this code to the snippet section of the EE control panel.