I have developed multilingual site, now i need XML sitemap for each language. In English it is working fine with all content types but in another languages it no links are shown except main URL. How can i achieve all content links in different language as well. Thanks in advance.
Module used: XML sitemap, Entity translation.
looks like a bug of the XML Sitemap module...
look at this Post! Hope that this will fix your issue!
Related
Starting with a website build with AngularJS as frontend and a ReST API set as backend. I would like to append an online help content.
Does exist a project or a framework to do that quickly (using angularjs powerfull) ?
I have no special mandatory requirements. I think that two concept could be important:
help section representation as a tree,
quick link between webapplication and online help.
JHipser may be the one you need.
I finally decided to build it without additional framework:
a flat json file that describe the structure and contents of my online help,
a controller with $http.get(...) embedded to get back the content
a dedicated help page : I re-use the bootstrap help menu and I use the ng-repeat directive to show the active content.
(Anyway Thanks #Shaojiang Cai for your suggest).
I am currently on a project that needs to be multilingual.
The project is based on a PHP server (could'nt use NodeJS) and the front-end is written with AngularJS.
Right now, my language is only set by a cookie, and my whole application is translated by angular-translate.
For SEO purpose, I would like my URL to look like:
www.mywebsite.com/LANG_PARAMETER/anypage
I don't really know how to combine AngularJS with URL rewriting or anything else like this, I am searching since yesterday but couldn't find any track to follow.
I think that ui-router could fit my needs, but I haven't time to rewrite my whole application using this module (it will be done later).
So if you have any idea...
Thank you!
I am using Google app engine and python to build an application. I am incredibly new to python as well as GAE. I have a index.html file with the basic template for my site. However I would like to replace the contents of a few tags depending on the URL. For example update the title tag for each individual pages. From what I can tell the recommended way to do this is using the lxml library.
And so... Tonight is my first time I have ever worked with lxml and I am having a really hard time wrapping my head around it. I have been fooling around with several permutations of the basic syntax and have not had much success understanding how it works. I have looked for different tutorials and the documentation is few and far between.
When I try the following code I get a 'lxml.etree._ElementTree' object has no attribute 'find_class' error, however the documentation here: http://lxml.de/lxmlhtml.html#parsing-html it sure looks like it should have that class
Am I on the right path? Is this the most efficient/best way to replace the content of html tags?
import os
import webapp2
import lxml.html
doc = lxml.html.parse('index.html')
doc.find_class("title") == 'About Page'
self.response.write(lxml.html.tostring(doc))
This is definitely not the way to that on Google App Engine. You should use some kind of template framework like Jinja2 or Django to achieve your goal.
But before all that you will have to make sure that you completed the Getting Started Tutorial, where you can see these things in action.
I need to make web app similar to google news.
Do i need to learn html scraping for that or some more techniques
Most of the stuff which Google News shows is all RSS/ATOM . It's way too easy to get the website content through RSS feeds as compared to scraping.
Other than that if you can use Java, then you can scrape html by yourself using the excellent library Goose . It is similar to what Flipboard/Instapaper uses
The easiest solution would be to get the RSS or ATOM feed of the website you are trying to get data from.
Those are well-known formats, and extracting informations from such XML feeds would be much easier than getting it from an HTML page : with RSS/ATOM, you'll just have to parse the XML feed, and extract the tags that contain informations that interest you.
Not sure which language you're working with, but chances are you can find some library that would help you with that.
If the website doesn't export an RSS/ATOM feed... Well, you'll probably have to fallback to HTML scrapping ; good luck with that, as HTML is not quite as well structured as RSS/ATOM : you'll have to find out, for each website, where in the page are the relevant informations.
I'm attempting to configure URL routing in my ASP.NET 3.5 WebForms app. Setting up routes has always been confusing to me, so I was hoping I could get some direction.
My requirement is fairly simple. I'm setting up different "brands" of my application, and I'd like the brand to be specified in the URL. For example, http://www.mysite.com/brand1/Default.aspx would bring up one brand (code behind would look up brand1 in the db and load specific text, images, themes, etc) and http://www.mysite.com/brand2/Default.aspx would bring up another brand, etc.
I'm fairly flexible with how the URLs are displayed, with the exception of keeping the http://www.mysite.com/brand1 prefix. That cannot be changed.
Thanks for any help!
I do this by using http://www.UrlRewriter.net, as explained here by Scott Gu:
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
The trick is to use URL rewriting rules (Regular Expressions) in your web.conifg to get a request for /brand1/default.aspx to actually execute /Processor/Default.aspx?brand=brand1, for example.
NB: The Form.browser trick worked a treat for me when doing postbacks.
Another possible answer from me...
If you're using IIS 7 there is a handy built in module for URL Rewiring, all controlled through a GUI if that's your preference:
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/