I was trying to access content through previews. At first, this was fine with both Preview and non-preview views, but I moved some of my code to another branch and noticed issues. I remembered seeing http://localhost:63761/1120 work, but now: I'm not sure if this is the correct form of address for content under 1120 to appear. Is there something I need to check?
Postfixing your url with an id is a quick way to look up the content of a node:
For example the following url works in my environment, but is not user or search engine friendly https://localhost:44392/1141
When I look up the node in my umbraco backend: https://localhost:44392/umbraco#/content/content/edit/1141
Navigate to the Properties tab and look for "Link to document", that's the user friendly url for the node
If I understand your question properly, the urls should be like below
Non-preview mode url -
http://localhost:63761/umbraco#/content/content/edit/1120
Preview mode url -
http://localhost:63761/umbraco/preview/?id=1120#?id=1120
Thanks
Related
I'm new in coding field. I decided to start a project with Django & Python, but I got stuck due to some errors. For the past 3 weeks, I tried to figure out what was the issue but couldn't find it. I will appreciate it if anyone help.
when I run my code, I get as an error, "TemplateDoesNotExist at /welcome_page/"
Everything as been specified but I'm still getting the same error
Here is the error page:
TemplateDoesNotExist at /welcome_page/
content of the welcome page:
Content of my the welcome page
my URLs :
URLS where I defined welcome page
My base content:
My base content
the place where the welcome page is calling from:
The place where the welcome page is calling from
My root to the welcome page from my C: drive:
My root to the welcome page from my C: drive
In your logout_request() view the last line is this:
return redirect("templates/welcomepage.html")
That's trying to redirect the user to a template. It should be redirecting to a URL.
In your urls.py the Welcome Page view has name="welcomepage" - this is what you use to refer to that URL. So change that line in your view to:
return redirect("welcomepage")
That will return the user to the "welcomepage" URL, which uses the views.welcome_page view, and the templates/welcome_page.html template.
By the way, if your welcome_page view is a class, as opposed to a function (I can't see it in your screenshot, so can't tell) then it's more normal in python to capitalise it: WelcomePage. Or WelcomePageView. Functions are lowercase (welcome_page).
If I see it right, you redirect to /templates/xxx.html but that path is not defined in your paths. The templates directory is the internal location, but the user can only see what is defined in the paths.
You should also better redirect ti the name of the page defined in the paths. Please post your settings.py maybe there is also a problem with the search path for templates.
When I want to link to an email from a webpage, I use mailto: like
Mail me!
Now, how to link to a federated Mastodon handle like #user#domain.org? I can get around the problem by linking the webpage of the user (domain.org/#user), but I wonder whether there is a way to let the client handle the link using user's preferred client, just like in the case of e-mail.
Not really, no. I asked about a URI scheme in the early days - see https://mastodon.social/#Edent/2094622
It might be nice to have mastodon://mastodon.social/#edent - but that link just wouldn't work for anyone who didn't have an app which could handle it.
The web has won. Everything is an https:// link now - with some legacy exceptions like tel: and mailto:
So, what's the solution?
When your web browser makes an HTTP request to a Mastodon server, this HTTP header is returned (formatted for clarity):
server: Mastodon
...
link:
<https://mastodon.social/.well-known/webfinger?resource=acct%3AEdent%40mastodon.social>;
rel="lrdd";
type="application/xrd+xml", <https://mastodon.social/users/Edent.atom>;
rel="alternate";
type="application/atom+xml", <https://mastodon.social/users/Edent>;
rel="alternate";
type="application/activity+json"
If the server name doesn't give your browser a clue which app to open, hopefully the webfinger stuff, or alternate links, will.
I just have created primitive html page. Here it is: example
And here is its markup:
www.google.com
<br/>
http://www.google.com
As you can see it contains two links. The first one's href doesn't have 'http'-prefix and when I click this link browser redirects me to non-existing page https://fiddle.jshell.net/_display/www.google.com. The second one's href has this prefix and browser produces correct url http://www.google.com/. Is it possible to use hrefs such as www.something.com, without http(s) prefixes?
It's possible, and indeed you're doing it right now. It just doesn't do what you think it does.
Consider what the browser does when you link to this:
href="index.html"
What then would it do when you link to this?:
href="index.com"
Or this?:
href="www.html"
Or?:
href="www.index.com.html"
The browser doesn't know what you meant, it only knows what you told it. Without the prefix, it's going to follow the standard for the current HTTP address. The prefix is what tells it that it needs to start at a new root address entirely.
Note that you don't need the http: part, you can do this:
href="//www.google.com"
The browser will use whatever the current protocol is (http, https, etc.) but the // tells it that this is a new root address.
You can omit the protocol by using // in front of the path. Here is an example:
Google
By using //, you can tell the browser that this is actually a new (full) link, and not a relative one (relative to your current link).
I've created a little function in React project that could help you:
const getClickableLink = link => {
return link.startsWith("http://") || link.startsWith("https://") ?
link
: `http://${link}`;
};
And you can implement it like this:
const link = "google.com";
<a href={getClickableLink(link)}>{link}</a>
Omitting the the protocol by just using // in front of the path is a very bad idea in term of SEO.
Ok, most of the modern browsers will work fine. On the other hand, most of the robots will get in trouble scanning your site. Masjestic will not count the flow from those links. Audit tools, like SEMrush, will not be able to perform their jobs
Is it possible to use FB share plugin without APP ID?
If I use HTML5 code then the console logs an error FB.getLoginStatus() called before calling FB.init().
To use HTML 5 FB like is it necessary to have an APP ID?
Thank you
Here i am sharing what i did to share post on fb wall, In this way you do not need to use appId. Just put this code in your HTML page where you want link to share...
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php?u={$url}&media={$imgPath}&description={$desc}" class="joinFB">Share Your Advertise</a>
URL parameters are as explained below,
u : url or link you want to user to go when he clicks on your wall post,
media : full image path,make sure that image is available on given path,it will accept one image only
description : a short description that you want to show on wall
It will also ask you to write some data which will be displayed above your post. Description passed in url will be displayed in right side of your image.
Please note that i had passed $url,$desc,$imgPath variables as per my need. The above code is in smarty-php, so change it as per your requirement.
Hope this becomes helpful to you.
Yes you need an app id. You can try to inject your own code into the DOM of the user when using facebook and call functions in their javascript... But I doubt many users will actiually use an "app" that works this way.
I´m implementing facebook comments boxes on my news pages. And it works. The problem is that if I make a comment on one page, it will display on ALL pages which contains fb comment boxes.
Currently my code looks like this:
<b><div class="fb-comments" data-href="http://selandia-ceu.dk/selandia/nyheder.aspx" data-num-posts="3" data-width="500"></div>
<script>
var fb-comments = document.getElementById('fb-comments');
mydiv.innerHTML =
'<div class="fb-comments" data-href="' + document.location.href + '" data-num-posts="3" data-width="500"></fb:comments>';
FB.XFBML.parse(fb-comments);
</script></b>
The website is using Microsoft Server. The url in the code is supposed to refer to the current page one is viewing. Anyone know what I´m supposed to do? :)
The comments are temporary disabled on the pages.
I got the extra bit of code (FB.XFBML.parse) from this thread:
Different Facebook comment box after each ajax call
You may need to clean up your Open Graph tags, as the URL that each comments plugin is pointed to will be scraped by the Open Graph linter and used to determine the canonical URL. The problem is likely that your comments plugins all end up pointing to the same canonical URL:
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fselandia-ceu.dk%2Fselandia%2Fnyheder.aspx
Use this Debug tool to inspect your Open Graph tags and ensure each page has it's own canonical URL. You also need to correct the fb:admins tag that you have in your HTML as suggested by the debugger.