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

https://www.omgqq.com/gatsbyc

https://www.omgqq.com/firstca

Very interesting

Very interesting information!Perfect just what I was looking for! “It is our choices…that show what we truly are, far more than our abilities.” by https://www.omgqq.com

Hi, We are wondering if you

Hi, We are wondering if you would be interested in our service, where we can provide you with a dofollow link from Amazon (DA 96) back to szantogabor.com?

The price is just $77 per link, via Paypal.

To explain what DA is and the benefit for your website, along with a sample of an existing link, please read here: https://pastelink.net/1nm60

If you'd be interested in learning more, reply to this email but please make sure you include the word INTERESTED in the subject line field.

Kind Regards,
Claudia

If you have ever before

If you have ever before looked at playing at an on the web casino,https://www.btlcasino.com우라카지노you should realize that the extensive a large number of all of them supply cash btlcasino.com bonuses as a motivation to participate in.https://www.btlcasino.com/first 퍼스트카지노 While there are some reasonable deals available today, being made, it’s significant that you comprehend precisely how gambling enterprise bonuses operate and also understand the conditions of the agreement.https://www.btlcasino.com/theking 더킹카지노

우리카지노는 더킹카지노, 샌즈카지노, 퍼스트카지노,

우리카지노는 더킹카지노, 샌즈카지노, 퍼스트카지노, 예스카지노, 33카지노, 슈퍼카지노,개츠비카지노를 통틀어 우리카지노 계열 이라고 합니다.

★━━━━━━★━━━━━━★━━━━━━★━━━━━━★━━━━━━★

PLAY CASINO GAMES ONLINE:

https://www.btlcasino.com 카지노사이트
https://www.btlcasino.com/theking 더킹카지노
https://www.btlcasino.com/sands 샌즈카지노
https://www.btlcasino.com/first 퍼스트카지노
https://www.btlcasino.com/yes 예스카지노
https://www.btlcasino.com/super 슈퍼카지노
https://www.btlcasino.com/gatsby 개츠비카지노
https://www.btlcasino.com/33 33카지노

I am in fact grateful to the

I am in fact grateful to the owner of this web site who has shared this enormous paragraph at here.

generic for clomid

generic for clomid https://clomidweb.com/

Wow that was strange. I just

Wow that was strange. I just wrote an incredibly long comment but after I
clicked submit my comment didn't show up. Grrrr...
well I'm not writing all that over again. Anyhow, just wanted to say
superb blog!

This info is invaluable. How

This info is invaluable. How can I find out more?

Appreciation to my father who

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

I think this is one of the

I think this is one of the most important info for me.
And i'm glad reading your article. But wanna remark on some general things, The
website style is wonderful, the articles is really great : D.
Good job, cheers

best milligram digital scale

best milligram digital scale buying kratom kavaat [url=http://kratomsaleusa.com/#]maeng da thai kratom[/url] kratom plant seeds how to grow kratom http://kratomsaleusa.com/

y immigration

y immigration [url=https://calis24.com/#]cialis worldwide shipping[/url] cialis
20mg cialis price card https://calis24.com/

Hello to all, how is the

Hello to all, how is the whole thing, I think every one
is getting more from this website, and your views are nice for new viewers.

I simply could not go away

I simply could not go away your website prior to suggesting that I really loved the usual
information a person provide on your visitors? Is going to be again continuously to check out new posts

exactly

exactly [url=https://chloroquinego.com/#]chloroquine facts[/url] statement chloroquine diphosphate sds national https://chloroquinego.com/

buy cialis online without

buy cialis online without prescription https://cialisle.com/

I do not even understand how

I do not even understand how I ended up here, but I assumed
this publish used to be good. I don't recognize
who you are however definitely you're going to
a well-known blogger if you happen to are not already.
Cheers!

could cialis generic best

could cialis generic best price critic
strengthen [url=https://getcialistabsfasty.com/]cialis generic best price[/url] able https://getcialistabsfasty.com/

Attractive portion of

Attractive portion of content. I simply stumbled upon your
web site and in accession capital to say that I acquire in fact
loved account your weblog posts. Anyway I will be subscribing in your feeds and even I success you get
entry to consistently fast.

Incredible points. Sound

Incredible points. Sound arguments. Keep up the good effort.

Thank you for another

Thank you for another excellent post. Where else may just anyone
get that kind of info in such a perfect approach of writing?
I've a presentation next week, and I'm at the look for such information.

This is very interesting,

This is very interesting, You're a very skilled blogger.
I have joined your feed and look forward to seeking more of your magnificent post.

Also, I have shared your website in my social networks!

Fantastic beat ! I would like

Fantastic beat ! I would like to apprentice at
the same time as you amend your web site, how could i
subscribe for a blog site? The account helped me a applicable deal.
I were a little bit acquainted of this your broadcast provided bright
clear idea

Hello there! I know this is

Hello there! I know this is somewhat off topic but I was wondering
if you knew where I could find a captcha plugin for
my comment form? I'm using the same blog platform as yours and I'm having problems finding one?
Thanks a lot!

Thanks for the good writeup.

Thanks for the good writeup. It actually was once a leisure account it.
Look complicated to far added agreeable from you! However, how
can we communicate?

Amazing blog! Do you have any

Amazing blog! Do you have any tips and hints for aspiring writers?
I'm hoping to start my own blog soon but I'm a little lost on everything.

Would you suggest starting with a free platform like Wordpress or go for a paid option?
There are so many options out there that I'm completely
confused .. Any tips? Kudos!

That is really interesting,

That is really interesting, You are an overly skilled
blogger. I have joined your rss feed and look forward to in the
hunt for extra of your excellent post. Additionally, I have
shared your web site in my social networks

Your style is really unique

Your style is really unique compared to other people I
have read stuff from. Thanks for posting when you have the opportunity, Guess I will just book mark
this page.

Good day! Do you know if they

Good day! Do you know if they make any plugins to help with SEO?
I'm trying to get my blog to rank for some targeted
keywords but I'm not seeing very good gains. If you know of any
please share. Cheers!

You really make it seem so

You really make it seem so easy along with your presentation but I
in finding this topic to be really one thing which I believe I might never
understand. It sort of feels too complicated and very large for me.
I am having a look ahead on your subsequent put up, I'll
attempt to get the dangle of it!

I read this article

I read this article completely regarding the comparison of latest and preceding technologies, it's amazing article.

Pretty! This has been an

Pretty! This has been an extremely wonderful
article. Thank you for providing this information.

Touche. Solid arguments. Keep

Touche. Solid arguments. Keep up the great effort.

Everyone loves what you guys

Everyone loves what you guys tend to be up too.
This type of clever work and reporting! Keep up the great works guys I've you guys to my own blogroll.

It's awesome designed for me

It's awesome designed for me to have a site, which is beneficial in support of my knowledge.

thanks admin

I don't even know how I ended

I don't even know how I ended up here, but I thought this post was good.
I do not know who you are but certainly you're going to a famous blogger if you are not already ;) Cheers!

Hey There. I found your

Hey There. I found your weblog using msn. That is a really
well written article. I will be sure to bookmark it and
return to learn extra of your useful info. Thank you for the post.

I will certainly comeback.

We're a group of volunteers

We're a group of volunteers and starting a new scheme in our community.
Your website offered us with valuable info to work on. You've done a formidable
job and our entire community will be grateful to
you.

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, yes this post is in fact

Hi, yes this post is in fact nice and I have learned lot of
things from it regarding blogging. thanks.

I'm gone to say to my little

I'm gone to say to my little brother, that he should also pay a quick visit this website on regular basis to
get updated from hottest news.

Hello i am kavin, its my

Hello i am kavin, its my first occasion to commenting anyplace, when i read this
post i thought i could also create comment due to
this sensible post.

Very quickly this site will

Very quickly this site will be famous amid all blogging viewers, due to it's fastidious posts

Link exchange is nothing else

Link exchange is nothing else except it is just placing the other person's website link
on your page at suitable place and other person will also do similar in favor of you.

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.