On Thursday, January 10, 2019 at 9:09:41 AM UTC-8, Stephan wrote: > > Hello there, > my question maybe touches rather how to structure a project probably. > Anyway: > > I have an App that lists a portfolio and involves pagination. In order to > avoid the whole page from being loaded every time the next portfolio item > set (page) is called, I am reloading the portfolio component into the main > page. This means that the link to the .load file is exposed to the google > crawler and gets indexed_ {{=A('<', callback=URL('listing.load', > args=[page-1,kat]), target='list')}} > I guess, it is not recommended to put another html head with a robots > directive into a .load component. > How do you solve this in your projects? > > Thank You, > Stephan > > Does robots.txt help any? (If you haven't implemented one yet, you may need routes.py or your front-end set up to catch that URL.)
/dps > The part of the main page view that emends the component looks like this: > > <div id="list"> > > {{=LOAD('default','listing.load', args=[page, kat], ajax=True)}} > </div> > > _______ > and the pagination inside the listing.load look like this: > > <!-- Pagination --> > {{if zahl > items_per_page:}} > <div class="row text-center"> > <div class="col-lg-12"> > <ul class="pagination"> > {{if page:}} > <li onclick='scrollWin()'> > {{=A('<', callback=URL('*listing.load*', > args=[page-1,kat]), target='list')}} > </li> > {{else:}} > <li> > <a class="muted"> </a> > </li> > {{pass}} > > <li class="middle"><a href="#">{{=(page+1)}} / > {{=(int(zahl / items_per_page) + (zahl% items_per_page > 0))}}</a></li> > {{if i > items_per_page:}} > <li onclick='scrollWin()'> > {{=A('>', callback=URL('*listing.load*', > args=[page+1, kat]), target='list')}} > </li> > {{else:}} > <li> > <a class="muted"> </a> > </li> > > > {{pass}} > > </ul> > </div> > </div> > {{pass}} > <!-- /.row --> > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.