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

  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • 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.
Kategória: 
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.

Hozzászólások

Thanks for sharing your

Thanks for sharing your thoughts about %meta_keyword%. Regards|

Having read this I thought it

Having read this I thought it was really enlightening.
I appreciate you spending some time and energy to
put this information together. I once again find myself spending a significant amount of
time both reading and commenting. But so what,
it was still worth it!

It's enormous that you are

It's enormous that you are getting thoughts from this article as well as from our dialogue made at this time.|

Just desire to say your

Just desire to say your article is as surprising. The clearness in your post is just great and i can assume you're an expert on this subject. Well with your permission let me to grab your RSS feed to keep updated with forthcoming post. Thanks a million and please keep up the gratifying work.|

Do you have any video of

Do you have any video of that? I'd love to find out some additional information.|

Having read this I believed

Having read this I believed it was extremely informative. I appreciate you taking the time and energy to put this information together. I once again find myself personally spending a significant amount of time both reading and posting comments. But so what, it was still worth it!|

You really make it seem so

You really make it seem so easy with your presentation but I find this topic to be
really something which I think I would never understand. It seems too complex
and very broad for me. I'm looking forward for your next post, I will try to get the hang of it!

No matter if some one

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

Your style is unique in

Your style is unique in comparison to other folks I have read stuff from.
Many thanks for posting when you have the opportunity,
Guess I'll just book mark this site.

These are in fact fantastic

These are in fact fantastic ideas in about blogging. You have touched some nice points here. Any way keep up wrinting.|

I'm gone to say to my little

I'm gone to say to my little brother, that he should also
visit this website on regular basis to get updated from newest
information.

Its like you learn my

Its like you learn my thoughts! You seem to understand so much approximately this, such as you wrote the guide in it or something. I believe that you just can do with some % to power the message home a bit, but other than that, that is magnificent blog. A great read. I'll definitely be back.|

Good info. Lucky me I

Good info. Lucky me I discovered your website by
accident (stumbleupon). I have bookmarked it for later!

I'm impressed, I must say.

I'm impressed, I must say. Rarely do I come across a blog that's both equally educative and amusing, and without a doubt, you have hit the nail on the head. The issue is an issue that not enough men and women are speaking intelligently about. I'm very happy that I stumbled across this during my hunt for something regarding this.|

I think everything posted

I think everything posted made a bunch of sense. But, think on this, what if you typed a catchier post title? I am not saying your content isn't good., however what if you added a headline to maybe grab folk's attention? I mean %BLOG_TITLE% is a little plain. You ought to peek at Yahoo's front page and see how they create post headlines to grab people to open the links. You might add a video or a related picture or two to grab people interested about everything've got to say. In my opinion, it would make your posts a little livelier.|

you're truly a just right

you're truly a just right webmaster. The web site loading pace is amazing. It kind of feels that you are doing any unique trick. In addition, The contents are masterwork. you have done a excellent activity on this matter!|

I always emailed this webpage

I always emailed this webpage post page to all my contacts, as if like to read it afterward my friends will too.|

Hey, I think your site might

Hey, I think your site might be having browser compatibility issues.
When I look at your blog in Chrome, it looks fine but
when opening in Internet Explorer, it has some overlapping.
I just wanted to give you a quick heads up! Other then that,
fantastic blog!

Hello would you mind stating

Hello would you mind stating which blog platform you're working with?
I'm going to start my own blog in the near future but I'm
having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your design seems different then most
blogs and I'm looking for something unique.
P.S Apologies for being off-topic but I had to ask!

Hi there! Someone in my

Hi there! Someone in my Myspace group shared this website with us so I came to look it over. I'm definitely enjoying the information. I'm bookmarking and will be tweeting this to my followers! Terrific blog and superb design.|

Bicycle Christmas

Hot Dip Galvanizing

エルメス時計コピー激安 China Cloth Yoga

China Catsuit

コピーブランドn級品 Crewneck Knitted

When someone writes an

When someone writes an article he/she retains the thought
of a user in his/her mind that how a user can know it. Thus
that's why this article is outstdanding. Thanks!

Great post.

Great post.

Hey just wanted to give you a

Hey just wanted to give you a brief heads up and let you know
a few of the images aren't loading properly.
I'm not sure why but I think its a linking issue.

I've tried it in two different web browsers and both show
the same results.

Thankfulness to my father who

Thankfulness to my father who told me about this web site, this webpage is really
amazing.

Gsm Cell Mobile Phone

whoah this weblog is

whoah this weblog is fantastic i really like studying your articles.
Keep up the good work! You already know, many individuals
are looking round for this information, you can aid them greatly.

コーチ財布コピー通販店 Coiled Barbed

カルティエ時計コピー品 China Rotary

Black Church

Hozzászólás

A mező tartalma nem nyilvános.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Engedélyezett HTML elemek: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <del> <img>
  • A webcímek és email címek automatikusan linkekké alakulnak.
  • A sorokat és bekezdéseket a rendszer automatikusan felismeri.
  • Engedélyezett HTML elemek: <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].
  • Minden email cím át lesz alakítva ember által olvasható módon, vagy (ha a JavaScript engedélyezett) ki lesz cserélve kattintható, de biztonságos hivatkozásra.