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.
  • 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

Opaque Pvc Sheet

Howdy excellent blog! Does

Howdy excellent blog! Does running a blog such as this take a lot of work?
I've absolutely no knowledge of programming however I was hoping to start my own blog in the near future.
Anyhow, should you have any recommendations or tips for new blog owners
please share. I know this is off subject however I just
needed to ask. Many thanks!

ed dysfunction treatment -

ed dysfunction treatment - natural pills for erectile dysfunction erection pills online

Polishing Machine

Construction Purchasing Agent

Hello friends, how is the

Hello friends, how is the whole thing, and what you would like to say on the topic of this piece of writing, in my
view its genuinely remarkable designed for me.

China Paper Pulp Cup Holder

Terrific post but I was

Terrific post but I was wondering if you could write a litte more on this
subject? I'd be very thankful if you could elaborate
a little bit further. Cheers!

Thanks for finally talking

Thanks for finally talking about >Válasz a
hozzászólásra

High Lumen Best Seller Led

Ethyl Acetate(≥99.7%)

It's actually a cool and

It's actually a cool and helpful piece of information. I am glad that you shared this helpful info with
us. Please keep us up to date like this. Thanks for sharing.

Featured

What's up, I wish for to

What's up, I wish for to subscribe for this weblog to take newest updates, so where can i do it please assist.

ivermectin cost canada -

ivermectin cost canada - stromectol coronavirus ivermectin 1 cream

generic name for ivermectin -

generic name for ivermectin - stromectol online canada where to buy ivermectin

Incredible points.

Incredible points. Outstanding arguments. Keep up the great effort.

Jewelry Beads

Fenbendazole And Ivermectin

modafinil generic

modafinil generic http://provipls.com/ getting a provigil prescription Wtjkoz eudoud

Cosmetic Industry Soft Tube

Battery Capacitor Tester

provigil a stimulant

provigil a stimulant http://modafinipls.com/ provigil a drug Wgnzqn khzfii

Fabric Storage Cubes

essay writers online

essay writers online http://geivermectin.com/ buy an essay paper Xtmjpj idzmul

I blog often and I seriously

I blog often and I seriously appreciate your information. The article has really peaked my interest.
I will bookmark your site and keep checking for new
details about once a week. I opted in for your Feed as well.

write my thesis

write my thesis http://boessay.com/ write papers for me Wpevsr uxryby

sugarhouse casino online

sugarhouse casino online http://cacinobz.com/ casino slot Tvnnol anrvjj

It's not my first time to

It's not my first time to visit this web page, i am browsing this
site dailly and get good information from here daily.

Jiangsu Hengxin Technology

Thanks for the marvelous

Thanks for the marvelous posting! I genuinely enjoyed reading it, you happen to be a great author.I will always bookmark your blog
and may come back sometime soon. I want to encourage you to continue your great work, have a nice weekend!

hard rock casino online

hard rock casino online http://cacinowina.com/ best real casino online Ctkqcr wtbvns

Cable Protective Box

100% Pet Filament

I enjoy, lead to I found just

I enjoy, lead to I found just what I was taking a
look for. You have ended my four day long hunt! God Bless you man. Have a great day.

Bye

professional research paper

professional research paper writers http://wrtessay.com/ mba essay service Gszkkz guylwu

Fantastic goods from you,

Fantastic goods from you, man. I have have in mind
your stuff prior to and you're simply extremely wonderful.
I really like what you have obtained here, certainly like what you are stating and
the way in which through which you assert it. You make it entertaining and you continue to take care of to
stay it wise. I can't wait to learn much more from you.
That is actually a terrific web site.

Automatic Welding Line For

Read lots of usefull tips and

Read lots of usefull tips and trick how to
win on online casino here :

https://www.bbd.casino/info_details/cara-menang-baccarat

https://www.bbd.casino/info_details/how-to-register

https://www.bbd.casino/info_details/how-to-deposit

https://www.bbd.casino/info_details/how-to-withdraw

https://www.bbd.casino/info_details/how-to-play-game

https://www.bbd.casino/info_details/how-to-win-online-casino

https://www.bbd.casino/info_details/best-way-to-play-roulette-online

https://www.bbd.casino/info_details/guaranteed-win-online-casino

https://www.bbd.casino/info_details/how-to-win-918kiss-jackpot

https://www.bbd.casino/info_details/best-game-to-play-at-casino

https://www.bbd.casino/info_details/tricks-to-winning-on-slot-machines

https://www.bbd.casino/info_details/malaysia-online-casino-promotion

https://www.bbd.casino/info_details/slot-game-malaysia

https://www.bbd.casino/info_details/online-slots-malaysia

https://www.bbd.casino/info_details/online-betting-malaysia

https://www.bbd.casino/info_details/trusted-online-casino-malaysia

https://www.bbd.casino/info_details/online-gambling-in-malaysia

https://www.bbd.casino/info_details/genting-casino

https://www.bbd.casino/info_details/online-casino-malaysia

https://www.bbd.casino/info_details/best-slot-machines-to-play-2021

https://www.bbd.casino/info_details/best-casino-games-for-beginners

https://www.bbd.casino/info_details/how-are-slot-machines-made

https://www.bbd.casino/info_details/how-do-slot-machine-work

https://www.bbd.casino/info_details/how-to-play-slot-machine-for-beginners

https://www.bbd.casino/info_details/how-to-play-slot-machine

https://www.bbd.casino/info_details/how-to-tell-if-a-slot-machine-is-rea...

https://www.bbd.casino/info_details/how-to-win-at-roulette

https://www.bbd.casino/info_details/how-to-win-online-casino-games

https://www.bbd.casino/info_details/mobile-slot-malaysia

https://www.bbd.casino/info_details/online-gambling-real-money

https://www.bbd.casino/info_details/real-casino-online-malaysia

https://www.bbd.casino/info_details/slot-machine-payout-schedule

https://www.bbd.casino/info_details/how-to-win-roulette-in-real-casino

https://www.bbd.casino/info_details/how-to-win-slot

https://www.bbd.casino/info_details/mobile-casino-pay-with-phone-credit

https://www.bbd.casino/info_details/online-casino-top-up-by-mobile

https://www.bbd.casino/info_details/tricks-to-winning-on-slot-machines-a...

https://www.bbd.casino/info_details/which-slot-machines-pay-the-best-2021

https://www.bbd.casino/info_details/best-online-betting-sites-malaysia

https://www.bbd.casino/info_details/how-to-read-betting-odds

https://www.bbd.casino/info_details/understanding-betting-lines

https://www.bbd.casino/info_details/how-to-read-horse-racing-program

https://www.bbd.casino/info_details/how-to-read-a-horce-racing-form

https://www.bbd.casino/info_details/how-to-be-good-at-poker

https://www.bbd.casino/info_details/how-to-play-fish-table-online

https://www.bbd.casino/info_details/how-to-play-idn-poker-malaysia

Computer Desk Modern

Magnificent beat ! I wish to

Magnificent beat ! I wish to apprentice even as you amend your website,
how could i subscribe for a blog web site?
The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided shiny transparent concept

academic writing article

academic writing article http://essaywrw.com/ need essay written Dcalgo nxtups

Hallway Ceiling Lights

I would like to thank you for

I would like to thank you for the efforts you have put in writing this website.
I'm hoping to view the same high-grade content by you later on as well.
In fact, your creative writing abilities has encouraged me to get my own,
personal blog now ;)

Automatic Soap Dispenser For

Led String Light Factory

Inflatable Bouncy Price

Protective Mask

I know this web site offers

I know this web site offers quality depending articles and additional
material, is there any other web site which provides such data in quality?

China Cnc Spare Parts

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.