I'm working on NodeJS/Express website using template with Mustache.
I have the header for all pages saved as partial, I want to have a background-color for example on one page and not having it in the home page, can this be possible or should I just make another partial?
Thank you
Related
I am working on a Mern-stack Application, and I want some info inside my App.js to not show when I visit Blog and other components.
Example:
anytime I visit the Blog page, I don't' want my full image slider and other components that I have in my App.js to display, rather I want the contents of that particular component that I visited to display only.
Perhaps you should consider navigation based on URL in your app. You can display specific view basing on URL match.
For example, at the root URL / you display your full image slider and other home page stuff, and when the URL is /blog you display your Blog component.
One really nice and intuitive way to do it in react is using react-router.
I've found that when launching an Outlook add-in, the URL that you configure in the manifest does not persist the fragment URL and this breaks Single Page Applications (SPAs). It works fine if you are just trying to go to the default route of the SPA e.g. index.html but if you try and go directly to a fragment URL (route) within the app then it doesn't work e.g. index.html#mypage
The index.html#mypage actually gets changed to this:
index.html?et=&_host_Info=Outlook|Web|1…_1480636166782|ocii1|https://outlook.office.com/owa/?realm=XYZ.com#&_serializer_version=1mypage&_xdm_Info=-133b2041_-3d735892_1480636166782|ocii1|https://outlook.office.com/owa/?realm=XYZ.com
Further explanation of the issue can be found here:
https://camerondwyer.wordpress.com/2016/12/02/issues-launching-outlook-add-ins-directly-to-a-spa-route-using-fragment-urls/
Moving to HTML5 style URLs is not currently an option for me so routing within the SPA needs to use the Fragment URL (hashbang). I imagine anyone trying to start an add-in and pass parameters in the URL would be seeing a similar problem.
In wordpress I want to show data from custom table. For this I created custom template and in that achieved from global $wpdb. I dont want any categories and posts of wordpress. I want to use wordpress for only static pages. I created one pluggin and storing data from this pluggin. So I need to show this data in the front end.
So far I created only one page from backend. So my problem is I need a links like these
http://localhost/application/medical/parameter1/parameter2
Here I created only one medical page from backend and added custom template. If run this url: http://localhost/application/medical/parameter1/parameter2.
It is redirecting to 404 page because parameters will not be send through the url.Here is the 2nd uri segment is medical and 3rd segment is parameter1 and 4th segment is parameter2.
Based on these segments I need to get data from database. I am assuming this is a htaccess problem.
How do I set htaccess for getting this?
Thanks in Advance.
I'm currently developing an admin dashboard using Sinatra, and I'm finding for one route in particular, my stylesheets and javascripts aren't working.
The route is '/users/:id/?'
For some reason, when I hit that page, the browser is looking for http::localhost:9393/users/css/my_stylesheet.css instead of public/css/my_stylesheet.css and so-on. Why is this happening with this route? The layout file (containing the stylesheet and script links) is that same for this route as it is for any other.
Never mind. Went on the #sinatra IRC channel and asked. My problem was how I was referencing the links in my haml views. I need to use the url helper #{url ('/path/to/asset.css')} in my code instead of hard-coding the links in.
We are creating a custom branded Master Page in SharePoint 2010. To make the page similar to a legacy page we have implemented an html based custom dropdown navigation menu we had in place directly on the Master Page (consisted of basic HTML elements ULs and LIs with A tags styled with a CSS class).
I assumed the links from the basic HTML on the page would be subject to Alternate Access Mappings currently in place, but it seems to not be the case. On a test page opened in 3 different URLs (http://sharepoint2010, http://sharepoint2010.mydomain.com, https://sharepoint2010.mydomain.com) the links from a WIKI page are modified as I expected, but the links from the Custom Navigation Menu (plain HTML on the Master Page) are not modified.
I can see where that would be useful... But is there a way that I can add links on the MasterPage in a way that SharePoint parses them first, making them subject to Alternate Access Mapping translation? I tried placing a link inside a SPLinkButton control, but it didn't achieve the desired behavior.
e.g.
<ul id="navmenu">
<li><SharePoint:SPLinkButton runat="server" NavigateUrl="http://sharepoint2010">sharepoint link</SharePoint:SPLinkButton></li>
<li>sharepoint2010</li>
<li>test</li>
</ul>
When I access the page via https://sharepoint2010.mydomain.com the links above are still http://sharepoint2010 rather than https://sharepoint2010.mydomain.com
Any thoughts?
Thanks,
Victor
EDIT (clarify):
I was planning on using relative links as a fallback. But for the purpose of what we are doing it would be more maintainable if we could keep the full links and use AAM.
I'm aware that standard relative links are a possibility. I was hoping to identify if there is a way to use AAM on Master Page content (or even on Content Retrieved from External Services down the road) by providing a specific link syntax, or control framework.
There is no need to re-insert the host name if your links are on the same domain and you're not using managed paths. Keeping your links relative will ensure that any bindings in IIS and AAM setup in SharePoint will work without any additional work.
Otherwise, I would heavily suggest to use the available ~sitecollection and ~site SPUrl token to retrieve the current site collection url or current web url. You need to wrap it in anything running server side as the expression will be handled ... server side.
eg:
<asp:Literal runat="server" Text="<% $SPUrl:~site/press-releases/ %>"/>
Hope it helped
When you use the NavigateUrl= attribute of the SPLinkButton, SharePoint renders a simple anchor with href= instead of regular PostBack JavaScript code. Alternate access mapping do not play a role here.
If its simply relative links you want, then leave out the dns entry altogether (ie the bit of the url you are switching with your AAM) and begin the url with a forward slash to make it relative. If this doesn't meet your needs, the way Sharepoint does it is with a relative url token. Have a look in v4.master for the tilda character followed by 'site' or 'sitecollection' which refers to the current web and site collection respectively. Copy this method. For more details, look at this link: http://msdn.microsoft.com/en-us/library/ms473643.aspx