data-nav-section from second html back to index.html not working correcty - sections

Good day, I'm stuck here.
In my index.html there are header options to navigate directly to the following sections:
<li>Home</li>
<li>Portfolio</li>
<li>Werkwijze</li>
<li>Tarieven</li>
<li>FAQ</li>
<li>Contact</li>
This al works well. So far so good.
Now I have a portfolio html page with the same sections in the header that should navigate back to the index page.
<li>Home</li>
<li>Portfolio</li>
<li>Werkwijze</li>
<li>Tarieven</li>
<li>FAQ</li>
<li>Contact</li>
When I click on any option in the header (of the portfolio html) it does navigate to the index page but not to the correct section but always to the top of the page (home).
So what I want is that I click "Contact" in the header of the portfolio html and that I get to the contact section in the index page.
Does anyone have advice for me how to get it done?

Related

using category tags in a nav bar on landing page

I have build a landing page to show case recipes using the product and products document types from Umbraco starter kit.
On the single recipes I put some category tags for the purpose to make them appear in a nav bar on the landing page.
I would like to use some code similar to this
<nav class="nav-bar nav-bar--center nav-bar--air-bottom">
<a class="nav-link nav-link--black nav-link--active" href="">All</a>
<a class="nav-link nav-link--black" href="">Vorspeisen</a>
<a class="nav-link nav-link--black" href="">Suppen</a>
<a class="nav-link nav-link--black" href="">Eintoepfe</a>
<a class="nav-link nav-link--black" href="">Hauptgerichte</a>
<a class="nav-link nav-link--black" href="">Deserts</a>
</nav>
I am sure that the above code won't work as it is right now. I have some basic experience with HTML but have no real clue about Razor and how to use the Umbraco Aliases etc.
I know what the above will build a nav bar on my landing page what I want. So that's fine. Only issue I have is that I don't know what to code to use in "" here: href="" to fetch the category tags instead of using a URL for a landing page which is not what I want and also not the ID of a property as I do not have an ID for each tag??? Or where may I find an ID of the tags I create on the content like shown on the screenshots below?
How can I fetch the category tags for the nav bar
Would really appreciate some help as I am no developer
Adding some screenshots to show what I am trying to use:
property on document type
actual category tags examples I want to use
As mentioned before, I am no developer so might need to share some more info to get the guidance I need. So if anybody would be willing to help but wants/needs to see some more code please just let me know what to share and I'll be happy to share what might be needed.
Update 16/02/19:
Structure would look like this:
Home
| -landingpage
| -parent landingpage (that's the page I want to use a nav bar that
filters the childs
| -child elements
| -landingpage
Tree Structure and structure of the landing page in question
pretty similar to a classic blog page.
I have used the default products template and product template from the Umbraco starter kit. and altered this a bit to fit my needs.
This works perfectly fine for my purpose.
I can't understand much since it's not in English but you should be able to do this in your view:
#{
rootPage = Model.AncestorOrSelf(1);
}
#foreach (var child in rootPage.Children) {
var categoryTag = child.GetPropertyValue<string>("category");
<div>#categoryTag</div>
//do whatever else you want in there with the category tags.
}
Here's the cheat sheet for traversing in Umbraco
Make sure you visit the cheat sheet to find different ways of traversing.
.Children is for the children (in the tree structure) of your current page.
.Descendants is for any node under your current page.
.Descendants("nodeAliasHere") is to find any descendant with a specific DocumentTypeAlias under your current page.
The idea behind the code should be: 'Go to the root page, get a descendant page, then find the property with value 'category''.

Doxygen: Modules page content

In doxygen, if you create modules, the modules page will show up, with very basic content:
I would like to customize this page by added some description how the modules are related.
First thing I tried was to simply reference the "modules" page:
/*!
#page modules
Can you see this content?
#details This is some extra content!
#section Detail-Section
Show yourself!
*/
This adds a link to normal modules page in "related pages", but the things I enter there will still not show up. In fact, they seem to be completly ignored!
I was not able to find out where to add this content, but checking the genereated html file let's me assume that it is possible.
The following snippet shows the html code that comes after the table that lists the modules:
</table>
</div><!-- directory -->
</div><!-- contents -->
<!-- start footer part -->
So, is there a way to actually add "contents" with doxygen from a comment like for normal custom pages?

How to render another page (not only content) in fluid

I search a way to render a page into another page.
I have a page with uid=186 and I want to render this on every page, so I try to render it in the layout.The page with uid=186 got another page template and also uses another layout (the layout is just empty, I don't really need a layout for that page).
My first try was:
<v:content.render pageUid="186" />
But that renders only the content, and also only the columns that are defined in the current page template, not the ones in the page templates I use in uid=186.
I also tried:
<v:render.request action="render" controller="Page" pageUid="186" extensionName="fluidpages"/>
But this leads to the PHP error:
mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 29 bytes) in /var/www/vhosts/myhost/typo3_src-6.2.9/typo3/sysext/frontend/Classes/ContentObject/Menu/MenuContentObjectFactory.php on line 50
As I use a page template with much columns in the page uid=186 I would love to render the hole page as it is, and not fetch each column.
I would also be fine with a typoscript solution.
Anyone got an idea how I could archive that?
you can make a separate file that render the uid=186 with page layout of uid=186
First you have to separate the header and footer or may be you can define the different sections for header and footer in one file (for ex pageObjects.html). so you can render that section whenever you want.
<f:render section="Header" partial="PageObjects" arguments="{_all}" />
<v:content.render pageUid="186" />
<f:render section="Footer" partial="PageObjects" optional="TRUE" arguments="{_all}" />

Facebook login button with html elements

About a year ago on our page we included a fb:login-button that instead of simple text for buttons text it had a html element inside.
<fb:login-button onlogin="document.getElementById('buttonid').click();">
<span onclick="some_function();">Login with Facebook</span>
</fb:login-button>
The span element is required becouse there is an implementation that handles different clicks (if ctrl is held for example).
This has been working until around 5th June. I have tried to find any information on recent changes but had no luck.
Does anyone know if there is still a way to have html elements inside a fb:login-button tag?

mvc renderpartial dialog difficulty

I have a view in which I have the following code:
<div id="DivPassword" >
<%Html.RenderPartial("PasswordDetails"); %>
I want to display the div as a dialog, in which I am successful. When I click on a link the dialog opens.
However, I can see that the partial view is also being displayed in the View, when the page loads. Why is it so? How can I correct that?
It displays because your code generates markup like:
<div id="DivPassword" ><!-- contents of partial view here --></div>
When a browser sees this markup, id displays stuff. :)
In order to not display the dialog until you run some JavaScript to make it display, you need to hide it. You can do this with a CSS rule:
div#DivPassword
{
visibility: hidden;
}
Pretty much all JS dialog libraries will change the visibility when you pop up the dialog.