ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Tutorial showing a Control Panel with Create Page option?

August 02, 2011 9:51pm

Subscribe [3]
  • #16 / Aug 04, 2011 8:38am

    svedish

    93 posts

    Hi Dave,

    It does make sense. Just didn’t hear a word prom Dan yet. Was hoping to hear his views on all these topics as well. I will have a play around as soon as I can back to this and I’ll post here if I have any doubts. Which I probably will have;

    Also, the more we talk, the more I realize my gut feeling about how ‘alive’ this project was is not wrong and you know what? You can learn a CMS, the curve may be steep, but eventually you get there, especially if you get a little bit of help from kind people like you. But if a project becomes obsolete I guess you have a far bigger problem that the learning curve to get to grips with it.

    In fact my next question (for someone in the EE team, hello guys!? 😊 ) is: are you working on this EE or not? What’s next? Are you coming out with version 3 anytime soon? Did I spend money on the right tool? The issues I see now are the same I saw more than one and a half years ago. Please shed some light. I think we customers deserve it.

    Thanks a lot.

  • #17 / Aug 04, 2011 11:44am

    svedish

    93 posts

    Hi again,

    I have another stupid question. My test to learn this is to replace the italian version of my website inside the it/ folder with the same stuff, just CMS driven. In order to create the templates I want to grab the HTML code of the existing pages, or at least one since the layout is the same and paste it in the template editor of EE. I will then decide which parts of the page become dynamic fields if it makes any sense.

    Now, in this HTML page there is a sidebar, which I want to keep hard coded in the template, for now (it will probably become dynamic as well as soon as I have grasped the basics).

    Now my question is, in the hard coded html there are some images and I am not sure how to reference those in the EE template because I am not sure where the template thinks he is? Is he in the root of the EE installation? So if I put an images folder there I can just not change anything? In order to make this clearer this is the files structure I have in my static it/ folder

    articoli.php
    clients.php
    contact.php
    css/
    form_ko.php
    form_ok.php
    imgs/
    index.php
    meet_mavo.php
    news_archive.php
    portfolio.php

    Thanks!

  • #18 / Aug 04, 2011 7:53pm

    Dave @ Exp:resso

    465 posts

    You first need to create an upload destination, and physically create the folder on the server. We usually use images/layout for general website images. You can then either use FTP, or use the built in file manager to upload files. You can then reference them as /images/layout/file.jpg or {site_url}/images/layout/file.jpg. Theres other ways to manage/upload images too

    Regarding your templates, you’d be best to split them up into common embeds. A standard setup would be creating an ‘embed’ template group, and creating templates called .header, .footer and .sidebar. Then on your other content templates you’d have something like this:

    {embed="embed/.header"}
    {embed="embed/.sidebar"}
    Your page content here
    {embed="embed/.footer"}
  • #19 / Aug 05, 2011 9:33am

    svedish

    93 posts

    Thanks Dave,

    Will have time over the week end to have a play around. Still need to hear from Dan? 😊

  • #20 / Aug 05, 2011 2:39pm

    svedish

    93 posts

    Hi Dave,

    I see Dan is not coming to the rescue, so I hope you will be able to give me a hand. I actually went quite far I have to say. It is quite simple once you grasp the basics, but of course I’m still at the very beginning so I got stuck. For now I’m only working on the static pages. Will then jump on the blog and portfolio areas.

    So, following your posts, for the static pages I have created a channel named content. I have created a fields group called content (with two fields: Page title and Body text) and I have assigned it to the channel. I have then created a content template group inside which I have created a page templates, which also includes 4 subtemplates: header, leftnav, rightbar and footer.

    From then on I have created several entries in this channel using the page template and all is working fine. I am also assigning simple URLs to each page (e.g. about/ contact/ meet-us/ etc.) taking advantage of the pages module.

    I am however having trouble with the home page because on that page (I’m using the index template for it) I need to show the contents of the page home. Of course, I could create an entry called home and use the URL of /my_ee_folder/home (EE is installed inside a folder on my website). But I would like to be a bit more elegant and show the home page when one types in just domain.com/my_ee_folder/. At present, if I type this URL in EE spits out all the entries of the whole content channel. Nooooo good 😛

    The tag I used, both in the page and index template are as follows. I am clearly missing something here and you were right, it’s all about understanding the URL structure.

    {exp:channel:entries}

    <h1>{page_title}</h1>

    {body_text}

    {/exp:channel:entries}

  • #21 / Aug 06, 2011 7:17am

    Dave @ Exp:resso

    465 posts

    You dont need to create a custom field for ‘title’, all entries already have a title field by default

    You should keep your header/footer templates separate, in a template group called ‘embed’ or something. Also they should have a dot in front of the name so they cant be accessed directly via the url.

    You’ll probably run into issues if you use the pages module for your homepage. So dont worry about entering a url/template for it. Instead, put the following on your home page template (which should be home/index or similar

    {exp:channel:entries url_title="url_title_of_your_homepage_entry_here"}
      {title}
      {body_text}
    {/exp:channel:entries}

    This tells EE to pull a specific entry, rather than looping through them all

  • #22 / Aug 06, 2011 9:04am

    svedish

    93 posts

    Hi Dave,

    I created a custom field called page_title because some pages don’t have a title (they open with a banner) and other have a text title. I thought the default title field can not be left empty right?

    I have kept header, footer, sidebar left and sidebar right into separate templates with a dot at the beginning, sorry if I didn’t explain it properly in my previous post. I had done it already.

    As for the home page I would like to access it by just entering the folder (domain.com/ee_folder/), without any additional URL bit, so I have used the index template instead of the page one, and in there i have used the parameter ‘entry_id’ to display just the entry that I have called home. This way if I access the installation folder I get to see that home page. Would that work? Or do I have to use a url?

    Thanks

  • #23 / Aug 06, 2011 9:38am

    Dave @ Exp:resso

    465 posts

    The main title can’t be empty, but you don’t need to show it on your template. It’d be much more logical to just use conditionals to only display the title where you want it , such as {if segment_1 == 'value'}{title}{/if}

    Yes you can access the homepage without specifying the template, there should be a star indicating which template group holds the home template. Dont put any other templates in this group. Sounds like you’ve got it set up right

  • #24 / Aug 06, 2011 10:49am

    svedish

    93 posts

    It would be tricky to use conditionals because I don’t know which pages have a title and which ones start with a banner if I create new ones. That’s why I chose the extra title field approach so the conditional I have is: “if that field is not empty show the <h1>”, if you see what I mean.

    As for the other answer, I have to say that for the home page I am using the index template of the group in which I also have the page template (the content group). So this group contains two templates, page and index. You think I should create a separate template group called, I don’t know…home, just to hold the index template to be used for the home page? And in that case what is the reason? Is it just best practice?

    Thanks a lot.

  • #25 / Aug 06, 2011 9:43pm

    Dave @ Exp:resso

    465 posts

    Well we always pu the home & 404 templates in the same group by themselves. Just easier to keep track of i guess, and we’ve had problems with putting other templates in that samr group in the past

    Re the banner - create a custom field to store the banner, then you can just say if banner is empty, show the title

  • #26 / Aug 06, 2011 10:57pm

    svedish

    93 posts

    Thanks a lot. I’ll move on to the blog development after this.

  • #27 / Aug 07, 2011 4:36pm

    svedish

    93 posts

    By the way, before moving into the blog development, I completely forgot to ask another question that has to do with all pages. Apart from SEO friendly URLs, which we have discussed in this thread (the page module etc.) I absolutely need unique meta tags for each page (at least title and description). Since I am grasping a little bit how this works, I imagine the answer to that is only creating two custom fields for them right? There are no built in features to add meta tags for each entry? I guess not because, unlike other CMS, as far as can understand, EE’s entries are not necessarily linked to a page, right?

  • #28 / Aug 07, 2011 8:39pm

    Dave @ Exp:resso

    465 posts

    No built in support but theres a few built in tricks. You may thing you need another channel entries loop in the header, but instead (and this is much more efficient) you can set variables inside the same channel:entries loop you use for your content, and pass it back to the header. We developed our own add-on to do this which isn’t released yet, but theres another one by Andrew weaver / eevolution I think called ‘string plugin”. Basciallly, you set a string in one place, and fetch it somewhere else. So you can either have a separate custom field for the meta title/description, or just use your normal title, and truncate the’ body’ field.

  • #29 / Aug 07, 2011 9:07pm

    svedish

    93 posts

    Hi Dave,

    I need full control and freedom on each of these two meta data. The reason is that I do quite a bit of SEO on this website. The best option is to create two custom fields for then, right? Or maybe I have missed somehting in your answer? Thanks.

  • #30 / Aug 07, 2011 9:23pm

    Dave @ Exp:resso

    465 posts

    Yep two separate custom fields is the way to go, then use a string plugin to send them back to the header. I can send you our one once I get into the office, its pretty easy to use.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases