Jumping to a specific id section on a different page - node.js

I am creating a portfolio project using handlebars and nodeJS. On my home(index) page, I have two sections down the page called 'about me' and 'contact me'. My nav bar also contains two buttons labeled 'about me' and 'contact me'. Both my 'contact me' and 'about me' have id tags with corresponding names.
I understand that when on the home page already, I can simply use
About Me
and this will automatically scroll down the page for me.
However, my issue is when I am not on the home page, but say one of my project pages. They also have the same nav bar, so if I want to click on 'contact me', simply using
About Me
it will obviously not work because that page does not contain the section with that id.
So my question is, if I am on a project page and I click on the 'contact me'/'about me' button in the nav bar, how do I get back to the home page and then also have it scroll down to those sections?
From this link, https://www.sitepoint.com/community/t/how-do-i-link-jump-to-a-specific-section-on-a-different-page/5646 I was hoping to get answers. But since I am using handlebars instead of html, this option does not work for me.Or at least I do not think it does.
I have my hbs all stored in a folder called views. The index.hbs is in /public/views. However my project pages are store in /public/views/partials <-- just for reference.
Thanks in advance!

Related

How to hide page title in GitLab Wiki?

I'm writing a wiki in another language, but I make links in English.
For example, in main page of GitLab-Wiki I see "Home",and if I create new page, called "CARS", I'll see CARS on top of new page.
So, I want to hide title from the page, which I created, cause sometimes my link could be home/blabla1234/cadfd
And every the page home has title: Home,
page blabla1234 has title: blabla1234 etc.
I googled it, and couldn't find any answer on my question. Maybe someone help me with this issue.

Extract links from a web page & write to console in Visual studios VB

I am creating a web application with VS 2012 Express for web using VB. When a user types in a url, I want the page to return a list of all the links and text input boxes on the page that could be clicked on and taken to that page or to fill in the input box. I do not want the url visible.
For instance: if I type a url in the address bar and hit enter, a new window would appear only showing the links such as menu items or text unput boxes in the following format:
Link: About Us
Text Input Box
It would not show: (the actual html code- completed)
'a href="http://mypage.com">About Us'
Use a WebBroswer control. Navigate to a page. Then WebBroswer1.Document.Links will have all the links in the page.

Orchard Navigation - how to make menu link not clickable

I have following menu navigation:
home
product
product 1
product 2
news
press releases
about us
Every menu item above links to a Content, except "product".I need to make it so when the user click "product" would not go anywhere.
I tried to use "Custom Link", and enters "#" or "javascript:void(0)" in the url, however that does not work since Orchard always prefix the url with "/".
Also, I tried to use "Html Menu Item" and enter "product" in the html body, but always rendered as
<li><span class="raw"><p>product</p></span><ul>...</ul></li>
I want either following:
<li>product<ul>....</ul></li>
or
<li>product<ul>....</ul></li>
Is there an easy way to do this?
In the Menu.cshtml file under the Core->Shapes->Views directory in the Orchard.Web project, you could do this:
$(document).ready(function () {
$("#Nav a").click(function(e) {
e.preventDefault();
});
});
The above disables clicking on all of your menu links, so if you want to prevent clicking on the second level menu items:
$('#Nav li ul li a').click(function(e){
e.preventDefault();
});
That Menu.cshtml file is the view for your navigation menu, so you can define it's behavior as you wish there. You can look at this answer of mine as well.
You may do as Mohammad says, but create an alternate Menu.cshtml in your Theme. It is bad practise to modify Orchards core code.

Remove "Link" in Homepage Logo and Menu item if in Homepage - EPiServer

I would like to remove the link to homepage in my page logo and menu item called "Home" if you are actually navigating in the Homepage, that is, the logo and Home link in the menu should not be a link if you are in the Homepage, in any other page they should be links again.
Any ideas on how to achieve this?
Many Thanks
Check using: PageReference.StartPage.ID == Container.CurrentPage.PageLink.ID
You could use it as the Visible-condition for placeholders around the A-tags... And instead of the property-control that will auto-link the name just use: <%# HttpUtility.HtmlEncode(Container.CurrentPage.PageName)%>

How can I create a separate search page for my blog?

I made a wordpress blog: link text
I have a separate htm page with the form and input field to search. It does not work. But when I have the search field and submit bitton in the sidebar on every page, it works fine. I left bot the sidebar search and the "search blog" page available.
Is it possible to have a separate search page and have the results appear normally?
Your search box is redirecting to the wrong URL
You send the visitor to /blog/?name=(search term)
Should be /blog/?s=(search term)
You can see this if you look at the URL for a search that works (i.e. from your sidebar).

Resources