Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-27 Thread Jonathan Lundell
On 27 Aug 2012, at 4:56 PM, SeamusSeamus wrote: > nevermind I fixed it. Not sure why, but if it was named 'equipment' the > controller showed up...any other name it doesnt. I just renamed Because you also have an application named 'equipment', so some URLs are ambiguous. > > On Monday, August

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-27 Thread SeamusSeamus
nevermind I fixed it. Not sure why, but if it was named 'equipment' the controller showed up...any other name it doesnt. I just renamed On Monday, August 27, 2012 5:05:44 PM UTC-6, SeamusSeamus wrote: > > ah, yes, all is well now...however, this is strange. > Now, when I click the link on the

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-27 Thread SeamusSeamus
ah, yes, all is well now...however, this is strange. Now, when I click the link on the table to take me to the 'equipment.html' page (I renamed it from details.html), it shows the controller in the URL: www.mysite.com/default/equipment/id/title how do I make it so the 'default' does not show

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-27 Thread Limedrop
I don't know if you picked this up, but you don't seem to have row.id as part of the sqlfrom url. Perhaps try: links = [lambda row: A('Details',_href=URL('default','equipment', args=[row.id, row.slug]))] On Tuesday, August 28, 2012 10:28:39 AM UTC+12, SeamusSeamus wrote: > > Okay, but do

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-27 Thread SeamusSeamus
Okay, but do I leave everything else alone? All I want to do is make it www.mysite.com/equipment/id/title currently, title is set up as slug in the DB. What am I doing wrong. In my view: equipment_id = request.args(0) equipment_slug = request.args(1) query = (db.equipment.id == it

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-26 Thread Bruno Rocha
def show(): item_id = request.args(0) item_slug = request.args(1) query = (db.items.id == item_id) & (db.items.slug == item_slug) item = db(query).select().first() return dict(item=item) http:///items/show/1/awesome-product http:///items/show/2/awesome-product On Sun, Aug

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-26 Thread SeamusSeamus
I would like to make it part of the URLbut am unsure how to do it...any tutorials or a quick way? On Saturday, August 25, 2012 6:59:29 PM UTC-6, Anthony wrote: > > Oh, yeah, I guess you probably can't use the id in a compute because there > is no id until the record has been inserted. You co

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-25 Thread Anthony
Oh, yeah, I guess you probably can't use the id in a compute because there is no id until the record has been inserted. You could instead make the id part of the URL (like Stack Overflow), or maybe make it a virtual field, or generate your own unique id (separate from the record id). Anthony O

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-25 Thread SeamusSeamus
Thanks for the info Anthony... When I do this: Field('slug', compute=lambda row: IS_SLUG()(row.title + "-" + str(row.id))[0]) I get none as a slug... On Saturday, August 25, 2012 5:53:49 PM UTC-6, Anthony wrote: > > Sure, something like that seems fine. Look at what SO does -- for example

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-25 Thread Anthony
Sure, something like that seems fine. Look at what SO does -- for example: http://stackoverflow.com/questions/12050934/web2py-build-forms-in-controller-or-view. I think they use the number as the unique record identifier, but also include a slug (which doesn't necessarily have to be unique). A

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-25 Thread SeamusSeamus
This runs into a problem where if I have two items of the same 'title', the user will only be linked to the first one that was created. Can I make it so the slug is a field that I designate? Or make it so the slug adds a incrementing number such as: Field('slug', compute=lambda row: IS_SLUG(

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-23 Thread SeamusSeamus
Thanks, that worked. I just added db.equipment.slug to the fields On Thursday, August 23, 2012 1:18:16 AM UTC-6, Anthony wrote: > > links = [lambda ro >> w: A('Details',_href=URL('default','show', args=[row.slug]))] >> fields = [db.equipment.category, db.equipment.title, >> db.equipment.

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-23 Thread Anthony
> > links = [lambda ro > w: A('Details',_href=URL('default','show', args=[row.slug]))] > fields = [db.equipment.category, db.equipment.title, > db.equipment.price] > You have not include "slug" in your list of fields, so I believe it will not be included in the data query. Instead of sp

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-22 Thread SeamusSeamus
Your are right, I need to change the links to default. This is what I have done so far, sorry for confusion: in controller: def index(): links = [lambda row: A('Details',_href=URL('default','show', args=[row.slug]))] fields = [db.equipment.category, db.equipment.title, db.equipment.pri

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-22 Thread Anthony
> > equipment is the table. > Yes, but in your code, it simply said args=[equipment.slug]. If your db object has a table named "equipment", you would refer to it as db.equipment, but in any case, that would not be relevant here. > the equipment details page is 'show' or 'details'. In reality

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-22 Thread SeamusSeamus
equipment is the table. the equipment details page is 'show' or 'details'. In reality, I thought I could get away with the default 'view' from sqlform.grid, using a slug...but it appears I cannot, so I have to create a custom 'show' or 'details' page. If I do links = [lambda row: A('Details

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-22 Thread Anthony
The only argument to your lambda is "row", so I assume you want row.slug. Because "equipment" is not an argument of the lambda, it will look for it in the outer scope. It looks like you must have a function named "equipment", which is what is being referenced in the lambda. Anthony On Thursday

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-22 Thread SeamusSeamus
sorry, replace products with equipment. My bad. I renamed it since and am using equipment instead of 'products'. I have it set up now and it is taking me to the view, but I cannot get the sqlform.grid to show anything except row.id. On Wednesday, August 22, 2012 11:01:36 PM UTC-6, Anthony wrot

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-22 Thread Anthony
What is "equipment"? On Thursday, August 23, 2012 12:53:10 AM UTC-4, SeamusSeamus wrote: > > In my SQLForm.grid I added this > links = [lambda row: A('Details',_href=URL('default','show', > args=[equipment.slug]))] > grid = SQLFORM.grid(query=query, links=links) > > > I also added the is_

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-22 Thread SeamusSeamus
In my SQLForm.grid I added this links = [lambda row: A('Details',_href=URL('default','show', args=[equipment.slug]))] grid = SQLFORM.grid(query=query, links=links) I also added the is_slug into the model...but get this error.. links = [lambda row: A('Details',_href=URL('equipment','

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-21 Thread Bruno Rocha
You want to create a slug? web2py comes with IS_SLUG validator which helps with this. db.define_table("product", Field("title", unique=True), ... ... Field("slug", compute=lambda row: IS_SLUG()(row.title)[0] ) So now you can use slug field to build your urls. URL("product", "sho

[web2py] Re: SEO Friendly URLs and Page Titles

2012-08-21 Thread SeamusSeamus
I didnt mean to do {{ }}, but I mean domain.com/product/productname (Product name being the name of the variable in the field from the model) On Tuesday, August 21, 2012 2:43:35 PM UTC-6, Anthony wrote: > > What is {{fieldname title}}? How do you get that value? > > On Tuesday, August 21, 2012

[web2py] Re: SEO Friendly URLs and Page Titles

2012-08-21 Thread Anthony
What is {{fieldname title}}? How do you get that value? On Tuesday, August 21, 2012 4:31:54 PM UTC-4, SeamusSeamus wrote: > > Thanks, what about URLs so it is > www.domain.com/product/{{fieldnametitle}} > > > On Tuesday, August 21, 2012 10:56:49 AM U

[web2py] Re: SEO Friendly URLs and Page Titles

2012-08-21 Thread SeamusSeamus
Thanks, what about URLs so it is www.domain.com/product/{{fieldname title}} On Tuesday, August 21, 2012 10:56:49 AM UTC-6, Anthony wrote: > > You can set response.title and response.meta in the controller or function > to make it specific to particular controllers or functions (or you can set >

[web2py] Re: SEO Friendly URLs and Page Titles

2012-08-21 Thread Anthony
You can set response.title and response.meta in the controller or function to make it specific to particular controllers or functions (or you can set them conditionally in a model file). If you need to use a database value, just do a query to get the value (your probably want to cache it to impr

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-30 Thread mdipierro
{{ response.title=table.name response.meta.description=table.name }} On Dec 30, 6:06 pm, Puntocom wrote: > On 13 dic, 05:08, Branko Vukelic wrote: > > > On Mon, Dec 13, 2010 at 4:29 AM, Michael McGinnis > > > Google is capable of figuring out what the page is about most of the > > time. It's jus

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-30 Thread Puntocom
On 13 dic, 05:08, Branko Vukelic wrote: > On Mon, Dec 13, 2010 at 4:29 AM, Michael McGinnis > > Google is capable of figuring out what the page is about most of the > time. It's just a bitch about compliance to their guidelines. They > seem to have God complex or something. At any rate, it's a goo

Re: [web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-12 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 4:29 AM, Michael McGinnis wrote: > Those are good ideas. Automatically appending the site name at the end > of each title might be helpful. Or copying the first paragraph as a > fall-back meta-description (not so sure about that one). Or inserting > dynamic keywords for eac

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-12 Thread Michael McGinnis
Those are good ideas. Automatically appending the site name at the end of each title might be helpful. Or copying the first paragraph as a fall-back meta-description (not so sure about that one). Or inserting dynamic keywords for each page into the meta keywords. But we also have to avoid duplicate

Re: [web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-12 Thread Bruno Rocha
OK, I like every comments about 301 redirect, and this is a good tip. But, I started this post with this subject in mind: I am thinking on how we can have some helpers, functions, directives or just > improvements in 'welcome' app to help us follow this SEO tips? So, how can we develop some hel

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-12 Thread ma...@rockiger.com
+1 PageRank is dying and not what Google really uses. The www.web2py.com vs web2py.com is a non issue from a search engine perspective. You can tell Google Webmaster Tools that web2py.com == www.web2py.com.

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-12 Thread GoldenTiger
I just saw Revision b6d1599cd0: changed links from web2py.com to www.web2py.com That is not the solution. No needs for changing links manually. The solution is the 301 redirect --> http://en.wikipedia.org/wiki/URL_redirection With a meta redirect the page with the redirect issues a 200 OK status

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-12 Thread GoldenTiger
SeoMoz has his own rank: the MozRank, based only on incoming links, and maybe more accurate, but only for main domain. Mozrank and pagerank usually have near values On 12 dic, 10:19, Michael McGinnis wrote: > Yes, we ought to standardize on www or non-www, but as GoldenTiger > implied earlier,

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-12 Thread Michael McGinnis
Yes, we ought to standardize on www or non-www, but as GoldenTiger implied earlier, the Google Page Rank displayed in toolbars and tools has little relationship to the numbers that Google actually uses to rank pages. Seomoz is a great resource. On Dec 11, 8:41 am, GoldenTiger wrote: > Yes, there

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-11 Thread GoldenTiger
Yes, there are a few links like that. In fact, the links with higher PR. Check all internal pagerank on http://www.internalrank.com http://www.web2py.com/examples/default/download is PR= 5 http://web2py.com/examples/default/download is PR= 5 Two links above should be one, so PR could be hi

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-11 Thread Martin.Mulone
There are some links in menu, that point to ex: web2py.com/book, in web2py mainsite. Perhaps we need to change to www.web2py.com.

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-10 Thread GoldenTiger
I have a Firefox PageRank toolbar, so I remember the pagerank for my most visited websites. However, the shown pagerank is outdated (a few months), and it is not very accurate. Urltrends displays old recorded stats, when someone checked it time ago. http://www.urltrends.com/viewtrend.php?url=http%

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-10 Thread mdipierro
where do you see this? > Maybe, that's the reason of recent decrease of web2py.com's pagerank > from 6 to 4. On Dec 10, 3:17 pm, GoldenTiger wrote: > I am thinking about it too. > > Concerning Pagerank, the 301 redirection it is important for web2py > domains. > > Google seehttp://web2py.comandht

[web2py] Re: SEO Tips & How this can be applied in web2py apps?

2010-12-10 Thread GoldenTiger
I am thinking about it too. Concerning Pagerank, the 301 redirection it is important for web2py domains. Google see http://web2py.com and http://www.web2py.com as different domains. Maybe, that's the reason of recent decrease of web2py.com's pagerank from 6 to 4. Helpful links about this: Prefe

[web2py] Re: SEO

2010-05-01 Thread weheh
@mdmcginn: you are correct in stating that hidden fields, if used to try to trick the webcrawler, can lead to a web ranking penalty. Thanks for clarifying.

[web2py] Re: SEO

2010-04-30 Thread mdmcginn
Actually, web crawlers don't ignore hidden fields, they penalize their misuse as spam. Don't feed any content to web crawlers that isn't visible to ordinary visitors. Al, you could embed each scanned image into its own HTML page, with the heading (title) and keywords at the top. How about adding n

[web2py] Re: SEO

2010-04-28 Thread weheh
I believe I read somewhere that web crawlers ignore hidden fields. I also believe I read somewhere that having a URL that says something in plain English is up there with the title in terms of SEO. In other words, use a RESTful URL with the various parts including your keywords so that it is litera

[web2py] Re: SEO

2010-04-27 Thread Yarko Tymciurak
On Apr 27, 6:07 pm, howesc wrote: > another trick that web2py makes real easy, is make sure that each page > has a unique URL by using request.args.  your url might look like: > > http://www.foo.com/default/index/43576/Image-title-here/another-thing > > where 43576 in the above URL is the ID (like

[web2py] Re: SEO

2010-04-27 Thread howesc
another trick that web2py makes real easy, is make sure that each page has a unique URL by using request.args. your url might look like: http://www.foo.com/default/index/43576/Image-title-here/another-thing where 43576 in the above URL is the ID (like in massimo's example), but the other parts a

[web2py] Re: SEO

2010-04-26 Thread mdipierro
say you have: db.define_table('paper',Field('image','upload')) db.define_table('tag',Field('paper',db.paper),Field('keyword')) then you will have an action like: def index(): paper=db.paper[request.args(0)] response.meta.keywords=','.join([tag.keyword for tag in db(db.tag.paper==paper.

[web2py] Re: SEO

2010-04-26 Thread Al
Thank you for all the comments... The web site is just a few hundreds of SCANNED image of verd old medical papers which can be searched by two database fields - Title and Keywords, so essentially it is just one web page with not much to be indexed on. There is also 'comments' people can add to each

Re: [web2py] Re: SEO

2010-04-26 Thread Jonathan Lundell
On Apr 26, 2010, at 9:01 AM, mdmcginn wrote: > To add to what Massimo said, make sure each page has a unique title > and meta-description. Search engines don't like websites where every > page appears to be identical. Also, don't count on them reading > Javascript. When you view the source of the

[web2py] Re: SEO

2010-04-26 Thread mdmcginn
To add to what Massimo said, make sure each page has a unique title and meta-description. Search engines don't like websites where every page appears to be identical. Also, don't count on them reading Javascript. When you view the source of the page, remember that's what the search engine crawler i

[web2py] Re: SEO

2010-04-25 Thread mdipierro
I do not have much to say about SEO other that set your meta description, meta description and find ways for other sites to you link yours. If you are using {{include 'web2py_ajax.html'}} in your layouts you can do response.meta.keywords=','.join([x.keywords for x in db().select(db.yourtable.keyw