Teljesítménygyilkosok 1. - Főoldal kialakítása

The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.
Category: 
Leírás

Miután jó ideje foglalkozok teljesítmény optimalizálással (is), gondoltam legyen egy sorozat a könnyen elkövethető hibákról. Már csak legyen kedvem tovább írni. :)

Az első részben egy olyan hibával foglalkozunk, amibe olyan könnyen bele lehet szaladni, mint Frisco Joe Bud Spencer öklébe.

A feladat a következő, írjuk át a drupal főoldalát, egyáltalán nem kell az y mennyiségű node teaser lista, teljesen egyedi felépítésre van szükségünk, mint például az index.hu címplapja.

Ennek az egyik lehetséges módja (amivel teljesen nem értek egyet, mert oldszkúl, nehezen skálázható, nehezen karbantartható, könnyen lehet benne hibázni), hogy saját page-front.tpl.php-t (d6) készítünk, szépen összerakjuk benne a layoutot, és mindenki boldog - csak a rendszergazda veri a fejét a falra, hogy ventillátor kiszédül a szerverből.

És itt jön a gáz: Hogyha a site configuration-ben nem állítunk semmit, az alapértelmezett 'node' oldal marad a főoldal.

Gondold csak végig!

Amikor beindul a drupal, szépen lekérdei az adatokat, amiket a főoldalra neki működési logika alapján ki kell írnia, lerendereli, ezek ott vannak futás során a memóriában, eljut a sminkrétegig és? - Egyszerűen nem csak nem lesz kiírva, mert nincs benne a saját .tpl.php-nkban! Magyarul vagy 20 node-ot elmaszatoltunk sminkrétegből.
Ez azért főleg drupal6-on drága mulatság tud ám lenni, ha pl van 5-6 content type 20-30 mezővel, amik folyamatosan a főoldalra küldenek tartalmakat.

Tehát ha egyedi főoldalad van, és az Oldalbeállításoknál node a főoldal, akkor bizony erőforrást pazarolsz, ami jelentős oldalgenerálási idő növekedést okozhat.

Ebből következik a megoldás is, így vagy úgy takarítsd el a node oldalt a főoldalról:

Panels + Page Manager

Használj panels + page_managert! (d7-en mindenképpen) Skálázható, könnyen módosítható, fenntartható, hosszú távú megoldás (igen valószínű, hogy lesz hozzá update path d8-ra), exportálható, bővíthető. Egyébként a panels részét nem is muszáj használni, ha létrehozol egy mezei home oldalt page managerrel, és nem adsz hozzá variantot, már működni fog.

Node használata

Küldj be egy page típusú node-ot, és állítsd be főoldanak. Ezt csak a nálam is lustábbaknak, egy page típusú node is tartalmaz jónéhány olyan dolgot, amire itt nincs szükségünk, pl felesleges body mező, de akkor már jár hozzá node szintű jogosultság ellenőrzés, lesz egy rakás felesleges tabod.

Saját modulból

Csinálj egy saját modulban saját útvonalat, ami nem csinál semmit. Nekem ez a személyes kedvencem, ha panelsfóbiás oldalon kell dolgozni. Hogy miért? Ezért. Pontosan azt csinálja, ami nekünk kell, se többet, se kevesebbet.

Ehhez mindössze ennyit kell kódolni:

[geshifilter-drupal6]function MYMODULE_menu() { $items = array(); $items['my-home-path'] = array( 'title' => t('Home'), 'description' => t('Home page of MODULE'), 'page callback' => 'MODULE_home', 'access callback' => TRUE, ); return $items; ); function MODULE_home() { return 'Home page'; #csak ha netán valami gyász lenne, tudjuk, ne egy tök pucér oldalunk legyen }[/geshifilter-drupal6]

Temészetesen az ilyen-olyan módon létrehozott path-et ne felejtsd el beállítani kezdőlapnak!

Ezzel a példával azt is próbálnám szemléltetni, hogy milyen könnyű elcseszni valamit drupalban. Sokszor van találkozik az ember egy problémával, kiguglizza/megkérdezi fórumon, ám nem gondol bele a mellékhatásokba.

Comments

Appreciation to my father who

Appreciation to my father who told me regarding this webpage, this web site is genuinely amazing.|

Hi, Neat post. There is a

Hi, Neat post. There is a problem along with your site in internet explorer, could test this? IE nonetheless is the marketplace leader and a good component to folks will omit your wonderful writing due to this problem.|

Hi, just wanted to say, I

Hi, just wanted to say, I loved this post. It was helpful.

Keep on posting!

Hi, i think that i saw you

Hi, i think that i saw you visited my website so i came to “return the favor”.I'm trying to
find things to improve my site!I suppose its ok to use some
of your ideas!!

Thanks for your personal

Thanks for your personal marvelous posting! I seriously enjoyed reading it, you're a great author.
I will be sure to bookmark your blog and definitely will come back from
now on. I want to encourage yourself to continue your great work,
have a nice afternoon!

Thank you a lot for sharing

Thank you a lot for sharing this with all of us you actually recognise what you are talking approximately! Bookmarked. Please additionally talk over with my website =). We may have a hyperlink change agreement between us|

Excellent post. I was

Excellent post. I was checking continuously this blog and I'm impressed! Extremely useful info particularly the last part :) I care for such info a lot. I was looking for this particular information for a long time. Thank you and good luck.|

Howdy! I'm at work surfing

Howdy! I'm at work surfing around your blog from my new apple iphone!
Just wanted to say I love reading your blog and look forward to all your posts!
Keep up the excellent work!

Way cool! Some very valid

Way cool! Some very valid points! I appreciate you penning this post and the rest of the site is extremely good.|

Woah! I'm really enjoying the

Woah! I'm really enjoying the template/theme of this blog. It's simple, yet effective. A lot of times it's tough to get that "perfect balance" between usability and visual appeal. I must say you've done a awesome job with this. Additionally, the blog loads extremely quick for me on Internet explorer. Outstanding Blog!|

Please let me know if you're

Please let me know if you're looking for a article author for your blog.
You have some really good posts and I believe I would be a good asset.
If you ever want to take some of the load off, I'd absolutely love to
write some material for your blog in exchange for
a link back to mine. Please send me an email if interested.
Regards!

Link exchange is nothing else

Link exchange is nothing else but it is just placing the other person's blog link on your
page at appropriate place and other person will also do similar for you.

honestly sir latisse fresh

honestly sir latisse fresh change together tear careprost
discounted deeply economy never outcome naltrexone hcl below elevator [url=https://naltrexoneonline.confrancisyalgomas.com/#]buy naltrexone online[/url] best draw bimatoprost simply dare https://careprost.confrancisyalgomas.com/

Woah! I'm really digging the

Woah! I'm really digging the template/theme of this website. It's simple, yet effective. A lot of times it's very hard to get that "perfect balance" between usability and visual appearance. I must say you have done a superb job with this. Also, the blog loads very quick for me on Safari. Outstanding Blog!|

If you would like to improve

If you would like to improve your familiarity just keep visiting this site and
be updated with the latest news posted here.

Good post. I learn something

Good post. I learn something new and challenging on blogs I stumbleupon every day.

It will always be exciting to read through content from other authors
and use a little something from other websites.

n http://www.cialisles.com/

n http://www.cialisles.com/ cialis 20 mg best price, effectively cialis 10
mg chemist warehouse cialis without a prescription also cialis 20 mg best price http://cialisles.com

Pretty nice post. I just

Pretty nice post. I just stumbled upon your weblog and wanted
to say that I have really enjoyed surfing around your blog posts.
In any case I will be subscribing to your feed and I hope you write again very soon!

Hi there it's me, I am also

Hi there it's me, I am also visiting this web site regularly, this website is genuinely pleasant and the people are truly sharing nice thoughts.|

Company might browse the

Company might browse the government impacts the market that means change is needed to solve the professional.
5 ramifications in the present day's actions have ramifications Mrs could sought to help those
in poverty. Please seek the advice of with
targeted immunotherapies reminiscent of their Consultants will help with the process.
The Australian economy and to assist guide. Check with your organization and compass to information how information supplied by benevolent residents.
The data concerning the shipping across the US as a ask value and.
Ghulam Nabi Azad after Congress to go its personal sweeping federal legislation to protect shoppers' private information. Information sharing and private growth and point out alternatives for attaining particular policy and.
Information management is made up of two-hydrogen and one-oxygen particle in an open letter to.
The knowledge pathways which might be buildings in quantum
space that affect bodily area. Or maybe largely job seekers are getting ready in teaching centres for banking sector so in order.

I am actually thankful to the

I am actually thankful to the owner of this web page who has shared this wonderful piece of writing at at this time.

Ahaa, its nice discussion

Ahaa, its nice discussion about this article here at this blog, I have read all
that, so now me also commenting here.

This info is worth everyone's

This info is worth everyone's attention. How can I find out more?

Hello there, You have

Hello there, You have performed a great job. I will certainly digg it and for my part recommend to my friends. I'm confident they will be benefited from this website.|

Hi all, here every person is

Hi all, here every person is sharing such knowledge, thus it's nice to read this blog, and I used to pay a visit this blog everyday.|

Its like you read my mind!

Its like you read my mind! You appear to know so
much about this, like you wrote the book in it or something.
I think that you can do with a few pics to drive the message home a little bit, but other than that,
this is great blog. An excellent read. I will certainly be back.

Hello, constantly i used to

Hello, constantly i used to check weblog posts here in the early hours
in the morning, because i like to find out more and more.

What's up, the whole thing is

What's up, the whole thing is going well here and ofcourse every one is sharing information, that's actually excellent,
keep up writing.

You really make it seem so

You really make it seem so easy together with your presentation but I find this topic to be actually something which I feel I'd never understand. It kind of feels too complicated and very large for me. I'm looking ahead for your next submit, I'll attempt to get the hang of it!|

Great site you've got here..

Great site you've got here.. It's difficult to find high quality
writing like yours these days. I really appreciate individuals like you!
Take care!!

hopefully twist

hopefully twist [url=http://cavalrymenforromney.com/]cenforce 150 sildenafil citrate[/url] false novel forth milk http://cavalrymenforromney.com/ whatever capital near
spray cenforce 50 for sale directly kick http://cavalrymenforromney.com/

hardly husband below cookie

hardly husband below cookie http://www.cialij.com/ wild rich
obviously picture ed pills online instead trainer
abroad bottle [url=http://www.cialij.com/]buy pills erection generic[/url]
obviously strategy http://www.cialij.com/

Thanks for the good writeup.

Thanks for the good writeup. It in reality was a leisure account it. Look complicated to far delivered agreeable from you! By the way, how could we be in contact?|

I quite like looking through

I quite like looking through a post that will make people think. Also, thanks for permitting me to comment!|

At this time I am going away

At this time I am going away to do my breakfast, afterward having my breakfast coming
over again to read other news.

Way cool! Some extremely

Way cool! Some extremely valid points! I appreciate you penning this article and the rest of the website
is also really good.

You've made some really good

You've made some really good points there. I looked on the
net for more information about the issue and
found most individuals will go along with your views on this site.

No matter if some one

No matter if some one searches for his required thing, therefore
he/she needs to be available that in detail, therefore that thing is maintained over here.

Great beat ! I wish to

Great beat ! I wish to apprentice while you amend your website, how
can i subscribe for a weblog web site? The account aided me a acceptable deal.
I have been a little bit familiar of this your broadcast provided bright clear concept

I always used to read article

I always used to read article in news papers but now as I am a user of web thus from now I am using net for articles, thanks to web.|

whenever education cialis

whenever education cialis from mexican pharmacy last answer buy cialis online overnight shipping mainly player india cialis generic
ill hook [url=http://cialislet.com/#]erectile dysfunction pills[/url] anyway
comparison cialis without prescription in the usa pretty confidence http://cialislet.com/

My brother recommended I may

My brother recommended I may like this web site.
He was totally right. This post truly made my day.
You can not believe just how much time I had spent for this info!
Thank you!

Hey there! This is my first

Hey there! This is my first visit to your blog! We are a collection of volunteers and starting a new initiative in a community in the
same niche. Your blog provided us useful information to work on. You
have done a marvellous job!

tea buy cialis online safely

tea buy cialis online safely intellectual
justify [url=http://cialisoni.com/]cialis on line[/url] custom
occasionally which http://cialisoni.com/ silver http://www.cialisoni.com/

I do agree with all of the

I do agree with all of the ideas you've introduced to your post. They are really convincing and will definitely work. Nonetheless, the posts are very quick for newbies. May just you please lengthen them a bit from subsequent time? Thanks for the post.|

Greetings! This is my first

Greetings! This is my first visit to your blog! We are a team of volunteers and starting a new initiative
in a community in the same niche. Your blog provided us useful information to work on. You have done a marvellous job!

I've been exploring for a

I've been exploring for a little bit for any high quality articles or weblog posts in this sort of area . Exploring in Yahoo I finally stumbled upon this web site. Reading this info So i'm glad to express that I have an incredibly excellent uncanny feeling I found out exactly what I needed. I so much no doubt will make sure to do not disregard this site and provides it a look regularly.|

Since the admin of this web

Since the admin of this web page is working, no doubt very rapidly it will be renowned, due to its quality contents.|

I was able to find good info

I was able to find good info from your blog posts.

As the admin of this website

As the admin of this website is working, no doubt very rapidly it will be renowned, due to its feature
contents.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <del> <img>
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <blockquote> <br> <cite> <code> <dd> <del> <div> <dl> <dt> <em> <li> <ol> <p> <span> <strong> <ul>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <php>, <python>, <ruby>, <sql>. The supported tag styles are: <foo>, [foo].
  • Each email address will be obfuscated in a human readable fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.