Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a...

19
Drupal User Guide ones 0

Transcript of Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a...

Page 1: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DrupalUserGuide

ones � 0

Page 2: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

TableofContentsI. Introduc@on 2............................................................................................................................................

II. Crea@ngaBasicPage 2..............................................................................................................................

III. Crea@nganAr@cle 5..................................................................................................................................

IV. Crea@ngaContentType 5.........................................................................................................................

V. InstallingaModule 7.................................................................................................................................

VI. Crea@ngaBlock 9......................................................................................................................................

VII. Menus 10...................................................................................................................................................

VIII. Mul@media:Inser@ngImagesandVideosintotheBodyofContentTypes 11.........................................

IX. Taxonomy 12.............................................................................................................................................

X. RestrictedAccess 13..................................................................................................................................

XI. MakingyourwebsiteMul@lingual 13........................................................................................................

XII. CloningaWebsite 16.................................................................................................................................

XIII. Crea@ngaRSSfeed 16...............................................................................................................................

XIV. UsefulLinks 17...........................................................................................................................................

� 1

Page 3: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

I. Introduc@on

DifferentFeatures:

II. Crea@ngaBasicPage

Defini@on:apagethatyoudonotnormallyupdateandisusuallylinkedtoamenu.Itisbestprac@cetouseaBasicPageforcrea@ngthemainpagesofthewebsite(AboutUs,OurServicesandsimilar)–allofthepagesthatarelinkedtothemenuontheBE-BIwebpages.

Steps:

1. Goto:ContentàAddcontentàBasicpage

� 2

Page 4: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

2. Awindowliketheonebelowwillappear

3. Adda@tletothepageandselectthelanguageinwhichthebodyiswri_en.Addsomecontentinthebodysec@on

4. Choosewhethertoaddamenulink.Ifyes,morefieldswillappear.

- Menulink@le:Youcangivethemenulinkadifferent@tlethanthemenupage.

- Parentitem:Select<Mainmenu>astheparentitem.

- Weight:Theweightinfluenceshowfarrightorleethelinkwillappear.TheBIhomepageissettoaweightof0whichmakesitthelandingpage.Aweight>0putsthelinktotheright.Thebiggerthenumberthefurthertotherightthelinkwillbe.Aweight<0putsthelinkonthelee.Forexample,theBEhomelinkhasaweightof-1.

5. Oncethepagehasbeencreated,youcanprovideatransla@on

Note:Toaddahyperlink,selectaword/sentenceoranimageandclickonthehyperlinkicon.Youcanthentypeinorcopy/pastetheURLlink.Nextgotothe‘Target’tabandselectthetarget–NewWindowandSameWindowarethemostused.

� 3

Page 5: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

� � �

Toaddatransla@on:

Ifyourwebsiteisn’talreadymul@lingual,pleaseskiptosec@onfirst.

1. Clickonthetranslatetab

2. Awindowliketheonebelowwillappear

3. ClickonaddtotranslatethepageintoFrench

4. Apagesimilartothebasicpagewillappear.Youcantheneditallofthefields–@tle,bodyandmenulink@tleandwritethemallintheotherlanguage–inthiscaseFrench

- InthemenusejngsclickmenulinkenabledonlyfortheFrenchlanguageifthemenulinksforFrenchandEnglisharedifferent

5. KeepthesamesejngsasfortheEnglishpage.

6. Ifyoueverneedtoeditanything,clickonthetranslatetabandyoucaneditboththeEnglishandFrenchversions

Note,ifyouwanttofindapagethatdoesn’thaveamenulink–orevenonethatdoes-clickoncontentinyourdashboardforalistofallofthecontentonyourwebsite

� 4

Page 6: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

Fromhere,youcanclickonthecontentyouwanttoseeoredit.

III. Crea@nganAr@cle

Defini@on:usedforcontentthatisupdatedoeen.OntheBE-BIwebsite,allofthesec@onpagesandtheinstrumentpagesarear@clecontenttypes.

Theprocessofcrea@nganar@clecontenttypeisverysimilartocrea@ngabasicpage.Themaindifferenceisthatanar@clealsohastheaddedfeatureofallowingtheadminusertoaddanimageandtags.

Steps:

1. Goto:ContentàAddcontentàAr@cle

2. Usethesamesejngsasforabasicpage.Note:ar@clesdonotusuallyhaveamenulink

3. Youcanaddtransla@onssimilarlytoabasicpage

4. Tofindyourar@clegotocontentandalistwithallofyourcontentwillappear

IV. Crea@ngaContentType

Atsomepointyoumightwanttocreateyourowncontenttype,tobeabletohavemorespecificfields.Forexample,thecontenttypeimageswasaddedtobeabletouploadimagestobeincludedintheslideshowsandtags(termreferences)werealsoaddedtocustomisewhatcontentappearsinthedifferentslideshows.

Steps:

1. Goto:StructureàContenttypesàaddcontenttype

2. Giveyourcontenttypeanameandpossibleadescrip@on

3. Inpublishingop@ons:select

- Defaultop@ons:published,unselectpromotedtofrontpage

� 5

Page 7: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

- Mul@lingualsupport:enabledwithfieldtransla@onandselecthidetransla@onlinksinthefieldthatwillappear

4. Indisplaysejngs:

- Un@ckdisplayauthoranddateinforma@on

5. Incommentsejngs:

- Defaultcommentsejngfornewcontent:hidden

6. Otherfeaturesareavailable,butthosearethemainchangestobedone.

7. Clickonsaveandaddfield

8. Anerror(shownbelow)willappear,promp@ngyoutorebuildpermissions.Dothisnow.Thisprocessmighttakeacoupleofminutes

9. Oncethisisdonegotostructureàcontenttypestofinishedi@ngyournewcontenttype.

10. Alistofallofthedifferentcontenttypeswillappear(shownbelow),clickonedit

11. Gotothe‘managefields’tab.Fromhereyoucanaddnewfieldsforyournewcontenttab.Forexample:

- Tags:fieldtype=termreference.Widget:choosefromautocomplete,checkboxesorselectlist.Onceyou’vemadethosechanges,youwillbepromptedwithavocabularytochoosefrom,selectthecorrectone(machines,sec@ons,tags–moreexplana@onabouttagswillbegivenlater).Followthroughthefollowinstruc@onsbeforesavingthesejngs.

- Image:fieldtype=image.Youwillbepromptedtofollow-up

� 6

Page 8: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

12. Youcanthencreatecontentofyournewcontenttype.

V. InstallingaModule

Defini@on:amoduleisacollec@onoffilesthatcontainsomefunc@onality(ex:transla@on)

Note:Beforedownloadinganynewmodule,itisalwaysbestprac@cetodoabackupincasethingsgowrong.TodoabackupoftheBItestpage,gotothemainpageandadd/_siteattheendoftheURL(ex:h_ps://test-be-bi.web.cern.ch/_site/)

Youwillberedirectedtoapageliketheonebelow:

Fromhereclickonbackupandrestore.

Enteratagforyourbackup–itcanjustbethenameofthemoduleyou’reabouttoinstall,sothatifthingsdogowrong,youcanrestoretheversionofyourwebsitebeforetheinstalla@onofyourmodule.

Onceyou’redone,gobacktotheoriginalURL(ex:h_ps://test-be-bi.web.cern.ch/en)andproceedwithinstallinganewmodule,pleasefollowthestepsbelow.

Steps:

1. GototheDrupalwebsite(h_ps://www.drupal.org/)anddownloadthezippedfile

2. Goto:ModuleàInstallnewmodule

� 7

Page 9: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

3. Anewwindowliketheonebelowwillappear.Clickonbrowseandimportthezippedfilethatyoudownloadedatthestart

4. Youwillnowneedtoenablethemodule.GotoModule.Awindowliketheonebelowwillappear

5. Usingthesearchfunc@onorthemenuontheleefindthemodulethatyouhaverecentlyuploadedandenableittobeabletouseitsfunc@ons

Note:Somemodulesrequireothermodules,soyoumightneedtodownloadthemand/orenabletheminordertouseyourmodule.TheDrupaldocumenta@onwilltellyouwhichmodulesyouwillrequire.Addi@onally,intheModulepage,undereachmodule,youcanfindmoreinforma@onabouteachmodulesrequirementsandalsowhatothermodulesneedthemoduletowork.

� 8

Page 10: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

VI. Crea@ngaBlock

Defini@on:blocksaretheboxesofcontent(ex:search,usefullinks)thatcanbedisplayedinregions(ex:sidebar,footer,etc.)onyourpage.

Steps:

1. Goto:StructureàBlocks

2. Youwillberedirectedtothisblockswindow.Ausefulfeatureofthiswindowis‘Demonstrateblockregions(CERN)’.(shownbelow)

Byclickingonthisyouwillberedirectedtoademonstra@onpage(seebelow)withhighlightedregions.Thisenablesyoutoseewhereyourblockwillappear.Rememberthenameoftheloca@onofwhereyouwouldliketoputyourblockandexitthedemonstra@on.

3. Youwillberedirectedbacktotheblockspage.Clickonaddblock

� 9

Page 11: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

4. AddaTitletoyourblock(op@onal)–theuserswillseethis@tle

AddaDescrip@on–seenbyyouontheblockspage

Addsomecontenttothebody

5. RegionSejngs:specifytheregioninwhichtheblockshouldbedisplayedàseethehighlightedregionsabove

➔ Note:if–none-isselectedtheblockwillnotbevisible

6. Configurethesejngs:

- Pages:eithershowblockonspecificpagesoronallofthem.Use<front>todisplayonthefrontpage

➔ Note:theFrenchandEnglishpagesdonothavethesameURL

- Languages:iftheblockneedstobetranslatedmakeittranslatableandshowthisoneonlyforthespecificlanguage,otherwiseleaveeverythingunchecked

- Contenttypes:showblockonlyforspecificcontenttypes.Leaveeverythingunchecked

- Roles:showthisblockonlyforspecifictypesofusers.Checkaccordingly.Ifnothingischeck,theblockwillbevisibletoeveryone

- Users:checknotcustomizable

7. Saveblock

Note:youcanchangetheloca@onoftheblockontheblockswindow(seebelow).Alwaysscrolldownthepageandsavethenewconfigura@onwhenyouaredone.

VII. Menus

Defini@on:acollec@onoflinks(menuitems)usedtonavigateawebsite.Themainmenu,istheonethatconcernsus,asthesearethelinksthatalloftheuserswillseewhentheygotothewebpages.

Steps:

1. Goto:StructureàMenus

� 10

Page 12: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

2. Clickonlistlinksofthe‘mainmenu’

3. Awindowwithallofthemainmenulinksonthewebpagewillappear.(shownbelow)Fromhereyoucaneasilychangetheweightofthedifferentlinkstotweaktheorder.Makesurethatyoualwaysscrolldownthepageandsavetheconfigura@ontomakesurethattheneworderispreserved.Alsoifyouwanttocreatealinkonthemenuthatsenddirectlytoanotherpage/URL(ex:Madeleine’sCorner)selectaddlink.Fromhereyouwillbepromptedtoadda@tleandapath.Youwillalsobeabletochangetheweightofthisnewlinkandselectalanguage.Similartocrea@ngabasicpagewithmenulink.

VIII. Mul@media:Inser@ngImagesandVideosintotheBodyofContentTypes

Inser@nganimageintothebodyofacontenttype(ex:ar@cle,basicpage)consistsofcopypas@ng.TheonlythingthatyouwillwanttowatchoutforisthatthetextformatisfullHTML.

� 11

Page 13: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

Inser@ngavideoontheotherhandrequiresafewaddi@onalsteps.

1. Findthevideoyouwanttoinsert

2. IfitisaYouTubevideoforexample,youwillwanttofindthe‘embed’pieceofcode.Tofindthis,gotoshareàembed(seebelow)

3. Makesurethetextformatis‘Plaintext’andcopyandpastethecode.

4. Nowswitchbackto‘FullHTML’andaboxliketheonebelowwillappear.Thisiswhereyourvideowillappearwhenyousavetheblock

5. Savetheblockandexittheeditwindow

Note:Ifyouwouldliketofindouthowtomakeaslideshow,watch:h_ps://www.youtube.com/watch?v=IoUg69kNy5s&index=44&list=PL15BE2E8313A4E809

IX. Taxonomy

� 12

Page 14: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

Defini@ons:taxonomyisDrupal’swayoforganisingcontent.Relatedtermsaregroupedinvocabularylists.Addi@onally,termscanbeassociatedwithcontentthroughtheprocessoftagging.

Steps:

1. GotoStructureàTaxonomy

2. Fromhereyoucaneitheraddanewvocabulary–listoftermsORadd/edittermsinoneoftheexis@ngvocabularylists.

- Newvocabulary:clickonaddvocabulary.Youwillthenbepromptedtoadda@tletothisvocabulary.Aeerthis,youwillhavetheop@ontoaddtermstothisvocabulary

- Add/Editterms:toaddtermsyoucandirectlyaddthemfromthetaxonomywindowbyclicking‘addterms’orclickon‘listterms’andthen‘addterms’.Toeditterms–clickon‘listterms’andthen‘edit’nexttothetermyouwanttoedit.

X. RestrictedAccess

Youmightwanttorestrictaccesstocertaincontenttypes.Forexampleyoumightwantapagethatcanonlybeseenbycertainusers,ormaybeimagesthatshouldonlybeshowntocertainpeople.InordertodothisgotoConfigura@onàPeopleàNodeaccess.Fromthiswindowyouwillbeabletocontrolwhocanview,editanddeleteallofthedifferenttypesofcontent.Forexample,youmightwanttocreateaCERNOnlyBasicPagecontenttype.

XI. MakingyourwebsiteMul@lingual

Youmightwanttomakeyourwebsitemul@lingual,sothatit’sbothinFrenchandinEnglishforexample.Toachievethis,youwillneedtodownloadafewmodules.Ialsosuggestwatchingthisvideo(h_ps://www.youtube.com/watch?v=lW8eimp54yM)whichexplainseverythingstepbystep.

Note:Drupalprovidesthefunc@onalitytomakeawebsitebilingual,howeveritdoesnotprovidethetransla@ons.Youwillneedtoprovidethetransla@onsyourself.

Steps:

1. DownloadtheEn@tyTransla@onandInterna@onaliza@onmodules(youmightalsoneedtheVariablemodule)

2. [email protected]@tyTransla@onandInterna@onaliza@onmodules

3. Youwillthenmostlikelybeaskedtoac@vatesomemoremodules

4. Youwillalsowanttoac@[email protected]@onandvariableTransla@on

5. Oncedone,checkthatallofthemoduleshavebeenproperlyac@vated–you’renowreadytoaddsomelanguagestoyourwebsite

6. Gotoconfigura@onàRegionalandLanguageàLanguagesàAddLanguage

� 13

Page 15: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

7. SelectoneofthePredefinedLanguageandSelect‘AddLanguage’.Ifitisn’toneoftheavailablelanguagesyoucancreateacustomlanguageofyourown.Onceyourlanguageiscreatedyouwillhaveadefinedpathprefix–thiswillhelpyoudis@nguishbetweentheinstancesofyourwebsiteinthedifferentlanguages.YoudonotneedtoaddasecondEnglishlanguageasisdoneinthevideo.

8. Youthenneedtoaddthedetec@onandselec@oncriteria

9. SelectURLdetec@onmethodforboththeuserinterfaceandthecontentandclick‘Savesejngs’

10. Youwillthenneedtoac@vatethetransla@onforalltherelevantcontenttypes

11. GotoStructureàContentTypes

12. Youwillthenwanttoedittherelevantcontenttypes.In‘Publishingop@ons’select‘Enabledwithfieldtransla@on’andselect‘Hidecontenttransla@onlinks’

13. Onceyou’redonesavethecontenttype.Followthesamestepsforalloftheothercontenttypes

14. GotoModulesandsearchEn@tyTransla@on

15. Totheright,[email protected]‘Configure’

� 14

Page 16: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

16. Fromhereyoucandecidewhichen@tytypescanbetranslated.Makesurenodeisselected

17. UndertheNodetabyouwillseeallofthedifferentcontenttypeswhichhavetransla@onenabled

18. Ifyouwritepredominantlyinonelanguageyoucansetitasthedefaultlanguagehere.Youwillwantto‘Excludelanguageneutralfromtheavailablelanguages’

19. Onceyou’redonesavethenewconfigura@on

Note:Ifyoustruggletotranslatecontent,makesureyouhavedownloadedtheTitlemodule.Youwillthenneedtogotoeachcontenttypeandreplacethenecessaryfields.Youwillbepromptedwithareplaceop@onintheopera@onsop@ons.(GotoStructureàContentTypesandselect‘managefields’fortherelevantcontenttypes)

Foreachfieldyouwillneedtoenablethetransla@onifrequired.Forexampletoenablethe@tlefield:click‘edit’andscrolltothebo_omofthepage.Underthe‘Fieldtransla@on’sec@onyouwillseetheop@onsbelow.Ifthefieldisnotalreadytranslatableyouwillhavetheop@on‘Enabletransla@on’insteadof‘Disabletransla@on’shownbelow.Click‘Enabletransla@on’ifnecessaryandthen‘Confirm’.Onceyou’redonesave.

20. You’renearlydone,theonlythingleetodoisadda‘LanguageSwitcher’blocksothatyoucaneasilyswapbetweenthetwolanguages.

21. GotoStructureàBlocksandenablethe‘LanguageSwitcher(userinterfacetext)’block.Irecommendpujngitintheheadersec@on

22. [email protected]@onstepsinsec@on‘II.Crea@ngaBasicPage’.Rememberyouwillneedtoprovideallofthetransla@ons.

� 15

Page 17: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

XII. CloningaWebsite

Cloningawebsiteisaveryeasyprocess.

Steps:

- Gotothedes@na@onsite

- Goto[nameofyourwebsite].web.cern.ch/_site/clone

- Choosethesitethatyouwishtoclonefromandclickon“Clonefrom”

IfyouhaveanyproblemspleaserefertothisforumpostonENTICE:h_ps://[email protected]/clone-site

andalsohavealookatthisuserguide:h_p://[email protected]/book/drupal-infrastructure-services/site-management/clone-site

XIII. Crea@ngaRSSfeed

YoumaywanttoaddaRSSfeedtothewebpages.RSSfeedscanmakethecontentmoredynamic,withouthavingtodoextrawork.Afewfeedsarealreadyincluded,[email protected](� )itmeansthatthereisanRSSfeedavailableforthiscontent.

Steps:

1. GotoConfigura@onàWebservicesàFeedaggregator

2. Awindowshowingallofthecurrentfeedsandtheirlastandnextupdateswillappear

3. Clickonaddfeed

4. Giveyourfeeda@tle

5. FindtheURLofthefeed.Remembertolookforthissymbol-�

6. Choosetheupdateintervalandthenumberofitemsinyourblock

7. GotoStructureàBlocks

8. Findyourfeedblock,thenamewillbesomethingsimilarto‘[@tle]feedlatestitems’andchangeitsregionloca@on

9. Gobacktofeedaggregatorandclickonupdateitems

� 16

Page 18: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

10. Yourfeedshouldthenappearinthedesignatedloca@on

Note:ToaddafeedfromtheCERNDocumentServer,pleaserefertothislink(h_ps://twiki.cern.ch/twiki/bin/view/CDS/CERNDocumentServerBrowserIntegra@on)[email protected],atthebo_omofthepage,youshouldseetheRSSfeedop@on.

XIV. UsefulLinks

CERNspecificDrupalforum:

h_ps://[email protected]/forums/general-discussion

- Usefulforgeneralques@onsaboutDrupalandalsoCERNspecificques@ons

DrupalFirstTimeUserGuide:

h_ps://www.drupal.org/node/877140

- GivesagoodoverviewofDrupalgivingafeelforhowitworks

- Insightsandlinkstostartlearning

DrupalOverview(YouTubeVideo):

h_ps://www.youtube.com/watch?v=25-RMAPtYnQ

- Goodvideotogetstarted

- Buildsasimplewebsitefromscratch

DrupalTutorials(SeriesofYouTubeVideos):

h_ps://www.youtube.com/watch?v=r6rllB4-xoE&index=4&list=PL15BE2E8313A4E809

- Simpletomoreadvancedtutorial

- Eachtutorialfocusesononepar@cularfeatureofDrupal

MakingaDrupal7websitemul@lingual(YouTubeVideo):

h_ps://www.youtube.com/watch?v=lW8eimp54yM

� 17

Page 19: Drupal User Guide - entice.web.cern.ch · be-bi.web.cern.ch/_site/) You will be redirected to a page like the one below: From here click on backup and restore.

DRUPALUSERGUIDE

- Goesthroughthewholeprocessofmakingawebsitemul@lingual

- Stepbystepinstruc@ons

� 18