Drupal rejtvény: kezdőlap és kezdőlap különböző

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

Egy érdekes helyzettel találkoztam: Kellett egy kezdőlap, ami különbözött attól, amit valójában maga a kezdőlapként beállított oldal mutat.

Na ez így tényleg zavaros lehet.. A rendes drupal kezdőlap egy view, ami a blog útvonalon helyezkedik el. Vagyis a beállításoknál a blog path van megadva kezdőlapnak. Van ám a főmenüben is egy blog path-re mutató menüpont, ám nincs külön "Home" menü, kivéve ha a logora illetve a címre kattint.

Szóval van egyszer egy cím: example.com
És egy másik: example.com/blog

Ezen a kettőn egy blokk kivételével minden ugyanaz. Értelemszerűen az következik, hogy a blog oldal legyen a kezdőlap, vagy lehet duplikálni a nézetet, de annak nem sok értelmét láttam.

Viszont ha ugyanaz az útvonal, hogyan legyenek megkülönböztetve? Attól, hogy example.com az url, az valójában az example.com/blog útvonalat fogja feldolgozni, így sem az arg(), sem a $_GET['q'] nem használható (mondjuk az előbbi is ez utóbbit használja..)

Nincs értelme contextet, preprocesst sem használni, hiszen mind az example.com, mind az example.com/blog tartalmazza az $is_front változót.

Én a megoldást a drupal menükezelésében találtam meg: Ha van egy definiált útvonal, ami jelen esetben a blog, akkor a drupal minden utána következő argumentumot annak a pathnak az argumentumakén kezel, ami után következik.

Nézzünk egy példát: a drupal belső útvonala: node. Ha mögötte ott van, hogy node/111, akkor a 111 a node útvonal argumentuma, feldolgozza, és jön a node. Ha azt írjuk be, hogy node/tistutyafile, akkor azzal az argumentummal nem tud mit kezdeni, egyszerűen levágja, és a node útvonalhoz tartozó menüelemet jeleníti meg.

A mi esetünkben ez a következő: a views definiálja a blog útvonalat. Ha én valamit mögé írok, és azt a menürendszer nem fogja feldogozni, akkor továbbra is a blog útvonalhoz kapcsolódó tartalom fog megérkezni.
Tehát a megoldás igazából annyi, hogy a kezdőlapnak blog/home van beállítva. A global redirect modul segítségével a user sosem fog találkozni a blog/home útvonallal az böngésző urljében, a robots.txt-ben pedig egy Disallow: /blog sorral a keresőrobotok számára teszük elérhetetlenné a blog oldalt.

És akkor a bónusz:

Ennek a blokknak nem szabad látszódnia, hogyha a view-on belül lapoznak, vagyis csak a nézet első oldalán kell megjelenjen.
Itt most egy randa példa jön, mert én a view fejlécébe tettem, de hamarosan átkerül egy context feltételvizsgálatába:

Ja, és azért sem akartam még szétkapni a kódot, mert az is szépen látszik belőle, hogyan lehet kódból boxes modul által létrehozott blokkot beszúrni.

[geshifilter-drupal6]$page = $_GET['page']; if ((empty($page) || $page ==0) && arg(1)) { $block = (object)module_invoke('boxes', 'block', 'view', 'mission'); return theme('block', $block); }[/geshifilter-drupal6]

Hozzászólások

I'm extremely inspired

I'm extremely inspired together with your writing abilities as neatly as with the structure in your blog. Is this a paid subject or did you modify it your self? Anyway stay up the excellent quality writing, it's rare to see a great weblog like this one today..|

Hi there! This post could not

Hi there! This post could not be written any better! Reading through this post reminds me of my previous room mate! He always kept talking about this. I will forward this post to him. Pretty sure he will have a good read. Thanks for sharing!|

Which i mentioned above

Which i mentioned above without having to say that any firm or even venture are unable to can be found devoid of its own staff members.

A child continuously serious

A child continuously serious about classes, mates, extracurricular exercises and / or members of your family could possibly have difficulties focusing, break within members of the family for no reason, show up pre-occupied or are reluctant to check out elegance.

They will conserve the exact

They will conserve the exact cultures how the Hubbell family group founded previously.

Becoming at hand is usually

Becoming at hand is usually coziness, cherish, protection, satisfaction, dream not to mention joy and happiness, all of thrown in one.

It is not extremely important

It is not extremely important to workcrews finished finding many of us for adjustable products as a result of every single listing, it happens to be yet crucial for you to discover products that could very well be replaced in addition to you choose to actively charge because most suitable Nine merchandise to get varying that you saw.

Kids Icarus posesses a Texas

Kids Icarus posesses a Texas accentuate together with ends every term together with the suffix "icus.Ins Therefore, that is why, he said specific things like, "Your highnicus! together with "There's not enough available time in order to loseicus!Centimeter and so forth.

I was curious if you ever

I was curious if you ever considered changing the page layout
of your website? Its very well written; I love
what youve got to say. But maybe you could a little more in the way of content so
people could connect with it better. Youve got an awful lot of text for only having 1
or two images. Maybe you could space it out better?

Hi colleagues, nice piece of

Hi colleagues, nice piece of writing and pleasant arguments commented at this place,
I am really enjoying by these.

Simply wish to say your

Simply wish to say your article is as amazing. The clearness in your post is simply spectacular and i can assume you are an expert on this subject.
Fine 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.

This information is worth

This information is worth everyone's attention. Where can I find out more?

FlexBuild Huntington Beach Concrete Company
2520 Florida St, Huntington Beach, CA 92648
714-410-5374
suzannaweiss98719 [at] gmail [dot] com

I love what you guys tend to

I love what you guys tend to be up too. This kind of clever work and exposure!
Keep up the fantastic works guys I've included you guys to my own blogroll.

Heya i'm for the first time

Heya i'm for the first time here. I came across this board and I find It really useful & it helped me out a lot.
I hope to give something back and aid others like you aided me.

Woah! I'm really loving the

Woah! I'm really loving the template/theme of this blog.
It's simple, yet effective. A lot of times it's
challenging to get that "perfect balance" between superb usability and
visual appeal. I must say you have done a
awesome job with this. In addition, the blog loads super fast for
me on Opera. Exceptional Blog!

Hmm it appears like your site

Hmm it appears like your site ate my first comment (it was super long) so I guess I'll just sum it up what I wrote and say, I'm
thoroughly enjoying your blog. I as well am an aspiring blog blogger but
I'm still new to everything. Do you have any helpful hints for first-time blog writers?
I'd certainly appreciate it.

Hi there to every , because I

Hi there to every , because I am really eager of reading this webpage's post
to be updated on a regular basis. It includes pleasant material.

I'm really enjoying the

I'm really enjoying the design and layout of your site. It's a very easy
on the eyes which makes it much more enjoyable for me to come here and visit more often.
Did you hire out a designer to create your theme?
Great work!

You actually make it seem

You actually make it seem really easy along with your presentation however I to find
this matter to be really something which I believe I'd by no means
understand. It seems too complicated and very huge for me.

I am taking a look ahead for your next submit, I will attempt to get the dangle of it!

Thank you for the good

Thank you for the good writeup. It in fact was a
amusement account it. Look advanced to far added agreeable from
you! However, how could we communicate?

Your style is so unique

Your style is so unique compared to other people I've read stuff
from. I appreciate you for posting when you've got the opportunity, Guess I'll
just book mark this page.

Thanks , I have recently been

Thanks , I have recently been looking for information approximately
this topic for a long time and yours is the best I have
came upon so far. But, what in regards to the conclusion?
Are you positive about the supply?

For most up-to-date

For most up-to-date information you have to visit world wide web and on world-wide-web I found this web
site as a best web site for newest updates.

Anaheim Divorce Lawyers in Practice
204 S Illinois St, Anaheim, CA 92805
714-410-5333
sabihafelix09835 [at] gmail [dot] com

I don't even know how I ended

I don't even know how I ended up here, but I thought this post was great.

I don't know who you are but definitely you're
going to a famous blogger if you are not already ;) Cheers!

Taxi moto line 128 Rue la

Taxi moto line
128 Rue la Boétie
75008 Paris
+33 6 51 612 712  

Taxi moto paris

Greetings! Very useful advice in this particular article!

It's the little changes which will make the largest changes.
Thanks for sharing!

Yes! Finally something about

Yes! Finally something about tree services.

Anaheim Divorce Lawyers in Practice
204 S Illinois St, Anaheim, CA 92805
714-410-5333
sabihafelix09835 [at] gmail [dot] com

Hello there! I know this is

Hello there! I know this is somewhat off topic but I was wondering which blog platform are
you using for this website? I'm getting fed up of Wordpress
because I've had problems with hackers and I'm looking at alternatives for another platform.

I would be awesome if you could point me in the direction of a good platform.

Good article. I certainly

Good article. I certainly appreciate this website.

Keep it up!

It's perfect time to make

It's perfect time to make some plans for the long run and it's time to be happy. I have read this submit and if I may just I wish to counsel you few interesting issues or advice. Perhaps you can write subsequent articles relating to this article. I wish to learn even more things approximately it!|

As the admin of this site is

As the admin of this site is working, no doubt very shortly it will be well-known, due to its feature contents.

Jay's Santa Clarita Tree Removal Kings
26174 Las Lanas Ct, Santa Clarita, CA 91355
661-464-1270
laureljefferson09875 [at] gmail [dot] com

Asking questions are

Asking questions are genuinely pleasant thing if you are not understanding something fully, however this post gives nice understanding even.
Jim's San Jose Carpet Cleaning
780 S 3rd St, San Jose, CA 95112
3408-351-1063
colettemackie2641 [at] gmail [dot] com

Quality posts is the crucial

Quality posts is the crucial to attract the visitors to pay a quick visit the web site,
that's what this web site is providing.

Independance Immobilière -

Independance Immobilière - Agence Dakar Sénégal
Av. Fadiga, Immeuble Lahad Mbacké
BP 2975 Dakar
+221 33 823 39 30

Agence Immobilière Dakar

For hottest information you have to pay a visit world-wide-web and on web I found this web
site as a best site for latest updates.

What's up, after reading this

What's up, after reading this remarkable post i am as well delighted to share my
knowledge here with friends.

Wonderful site you have here

Wonderful site you have here but I was curious if you knew of any message boards that cover the
same topics talked about here? I'd really love to be a part of community where I can get feedback
from other experienced individuals that share the same interest.
If you have any recommendations, please let me know.
Thanks!

Thank you for some other

Thank you for some other informative web site.

Where else may I am getting that kind of info written in such a perfect manner?
I have a undertaking that I'm just now running on,
and I have been on the glance out for such information.

M.E.C Mon Electricien

M.E.C Mon Electricien Catalan
44 Rue Henry de Turenne
66100 Perpignan
0651212596

Electricien Perpignan

Hello my family member! I wish to say that this article is amazing,
great written and come with approximately all important infos.
I'd like to peer more posts like this .

Hello, I enjoy reading

Hello, I enjoy reading through your article. I wanted to write a little comment to support you.

Jim's San Jose Carpet Cleaning
780 S 3rd St, San Jose, CA 95112
3408-351-1063
colettemackie2641 [at] gmail [dot] com

Hi, Neat post. There is a

Hi, Neat post. There is a problem with your website in web explorer, might test this?
IE still is the market leader and a large section of people will pass over
your fantastic writing because of this problem.

For most up-to-date news you

For most up-to-date news you have to visit world wide web and on world-wide-web I found this website as a best web page for most recent updates.|

I love what you guys tend to

I love what you guys tend to be up too. This sort of clever work and exposure!
Keep up the awesome works guys I've incorporated you guys to my personal blogroll.

Fantastic goods from you,

Fantastic goods from you, man. I've understand
your stuff previous to and you are just extremely great.
I really like what you've acquired here, really like what you're saying and
the way in which you say it. You make it enjoyable and you still care for to
keep it wise. I can not wait to read much more from you. This is really a
terrific site.

Saved as a favorite, I really

Saved as a favorite, I really like your site!

Oh my goodness! Incredible

Oh my goodness! Incredible article dude!
Many thanks, However I am having problems with your RSS.
I don't know why I cannot subscribe to it.
Is there anybody having similar RSS issues? Anyone who knows
the solution will you kindly respond? Thanks!!

If some one wishes expert

If some one wishes expert view on the topic of blogging then i suggest him/her to pay a visit this webpage, Keep
up the nice job.

My developer is trying to

My developer is trying to convince me to move to .net from PHP. I have always disliked the idea because of the costs. But he's tryiong none the less. I've been using WordPress on various websites for about a year and am worried about switching to another platform. I have heard very good things about blogengine.net. Is there a way I can transfer all my wordpress posts into it? Any help would be greatly appreciated!|

I know this if off topic but

I know this if off topic but I'm looking into starting my own weblog and was wondering what all is needed to get setup? I'm assuming having a blog like yours would cost a pretty penny? I'm not very internet smart so I'm not 100% certain. Any tips or advice would be greatly appreciated. Appreciate it|

Fine way of telling, and

Fine way of telling, and fastidious post to obtain information on the topic of my presentation focus, which i am going
to convey in university.
Jay's Santa Clarita Tree Removal Kings
26174 Las Lanas Ct, Santa Clarita, CA 91355
661-464-1270
laureljefferson09875 [at] gmail [dot] com

It's the best time to make

It's the best time to make some plans for the future and it is time to be happy.
I've read this post and if I could I wish to suggest you some interesting things or suggestions.
Maybe you could write next articles referring to this article.
I wish to read more things about it!

Does your site have a contact

Does your site have a contact page? I'm having problems locating
it but, I'd like to shoot you an e-mail. I've got some
suggestions for your blog you might be interested
in hearing. Either way, great blog and I look forward to seeing it expand over time.

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.