I'm trying to implement routing on a simple site using web forms 3.5 SP1. The problem is that the site is using a simple form of CMS, so the user can create html content and add images.
Since all the 'articles' in the database are stored with the image urls relative to the Default.aspx and my route is idCat/*categoryPath, all the images now appear broken.
I guess I could parse all the src and href attributes in the articles on the fly, but I'm hoping for a better solution...
In most WYSIWYG editors there is a configuration value to set the full path for uploaded images.
UPDATE: For you comment, ckEditor! It is much more robust and has the option I have mentioned.
Related
Some co-workers and I are develping an application in which we need to have multiple languages. Our idea is to have the header's language following the user's browser settings while the content's language of the webpage will be changed when the user click somewhere.
We've tried using the usual resources technique, but it applies the translation to the whole website - and that's not the goal.
Is it possible to add multiple-language translation to the same page?
In other terms, we'd like the layout to load Resources_EN.resx while the page's content to load Resources_ES.resx.
We had a client ask us to redisign their Volusion site. I understand that Volusion gives you access to, basically, 1 main HTML file and a small handfull of CSS files. But, if I understand correctly, they do NOT give you access to edit the .ASP files for the site/template.
Beyond simple CSS changes, How do you create your own custom Volusion Template without access to .ASP files?
You do not have access to the code that makes up the product or category content areas for example.
You are able to edit the primary template (ie template_yourstore.htm) and its corresponding CSS. If you want to go further than this you are dependent on javascript to makes changes client-side.
To be totally clear, you can use asp but only on your own asp pages. You cannot change Volusion's code.
I am new to Umbraco CMS. I have an existing website which is developed in asp and asp.net.
Now I have requirement to convert this existing website to new website using Umbraco CMS.
The pages available in existing website are almost all static pages..
My question : Is there any way to import these static pages into my Umbraco website.
So that I can skip the manual content creation of these pages in Umbraco.
In short, it depends on how much you need to edit on the original pages and how many pages there are.
If the content is never going to be edited, then you can maybe create most as just normal masterpages (umbraco templates). You can then just add in Navigations and other CMS spec
Or another way of doing it would be to create 1 template and add a big text box to the DocType which you can then paste the HTML into. However this will mean you will end up with loads of HTML in the DB.
If you want to make it a 'true' Umbraco site and use as much of the CMS functionality as possible then there is no really easy way of converting HTML into an Umbraco site.
If the data was in a DB you could use CMSImport and map the old to the new DocType fields, but you would still probably have to do some HTMLTidy work on it before importing.
Depending on the amount of pages, the best and easiest way is usually to just copy and paste in my opinion because it allows you the chance to perform a content audit at the same time and clean up HTML where necessary.
I did this before.
Created a basic template / view with header and footer and main content area.
Then use Screaming Frog (or a similar tool) to crawl the site.
Use the output of the page crawl to make a comma delimited list of Urls
then use this to find each page.
For each page, create an Umbraco page with the name of the url, ie /something-page-name = 'Something Page Name' Use HTML Agility pack to navigate the HTML and pull out key elements such as Title, Description etc and locate the main content by navigating the DOM and literally take the InnerHTML of that section into the content field of the Umrbaco page and save and publish it.
Make sure you allow your content editor in Umbraco to edit all the html elements found in the source page. Ie you may have section or small tags which the editor may not recognise.
I have already a web site written in Html but I want to add some dynamic contents in Asp.net. So I will add 2 or 3 aspx pages whit form to my project.So the question is: Is it necessary to convert my simple static HTML page to aspx to publish my web site? What is the best way in this case?
There is no need to convert your HTML pages.
Static and dynamic content can live side by side without an issue.
Just add your ASPX pages - you may need to consider a migration path if you do have a static page that needs to be converted to a dynamic one (a permanent redirect should do).
no, just go for the conversion to asp.net of those web pages which have the dynamic content.
ASPX and plain HTML pages can live together happily because from a browser's point of view they all are html pages.
Web browsers don't understand ASP.NET. The content they understand is HTML. So when a browser requests for an .aspx link all that ASP.NET returns is plain HTML (with CSS and javascript, which browsers also understand). So at design time when you add an ASP.NET control, lets say a DropDownList, ASP.NET will render it as a <select> HTML tag.
I'm an ASP.NET newbie, but not so new at programming in general.
I'm creating a commercial website, and I want to allow an admin to add new articles (an article consists of text, images and various properties such as category).
I am trying to decide the optimal Modus Operandi. This site is commercial, so SEO is a major consideration. This means that I want each url to be "unique". That is, if someone navigates to an article about raccoons, he should be redirected to www.mysite.com/articles/raccoons. This means - I can't have one page that loads the appropriate article dynamically a-la AJAX (gotta use deep-linking)
So how exactly do I do this? suppose the admin entered his text, uploaded the images and set the article properties. I create a new subfolder, save the images to the server (I understand that saving images to a DB is a big no-no), their addresses in a DB, and the content itself to the DB. But now what?
How do I go about creating the actual page?
Is there a function for creating a new aspx file? then what about its corresponding cs file? Or is it unwise to use aspx? Maybe plain html? but then how does it work with my site's master page? Or maybe just create another copy of a general aspx file which is populated with an article according to a parameter?
I would like to know what is the "smartest" approach before I dive in too deep.
You can Consider ASP.Net MVC for this. What you need is more like a Content Management System rather than a Blog, as you mentioned an administrator will add articles.
By Using ASP.Net MVC, you have a very clean implementation there, your urls will stay as you need it for SEO, You dont have to create aspx pages on the fly but the framework will let you deal with new urls from your class files.