SamC Posted July 24, 2016 Share Posted July 24, 2016 Ok, so I didn't think I'd be back quite so fast being a forum pest but this one's got me pretty confused. I've followed another tutorial and what's happening to me is different from the video, probably I'm running a newer version of PW. I have two templates blog-index.php and blog-entry.php. blog-index.php is a one off. No other pages should use this, just /blog/. blog-entry.php pages are children of blog. So I wanted to use the shortcut to 'Add New' to be able to create a blog entry, which automagically files the page as a child of blog. When I try and set this up, I get the following mesage (and still only 'Bookmarks' under the 'Add New' button): Templates indicated with ♦ also need to be configured to allow this template as a parent. Click any selected template as a shortcut to configure allowed parents. Now, when I check the dropdown above this, a few templates have a '♦' next to them, namely 'admin', 'permission', 'role' and 'user'. What else do I have to do here? I'm not sure why I'd have to configure these other templates in order to only allow blog entries under blog. What do the other templates have to do with this? Tried searching around for this to no avail. My past experience has shown me that I don't expect clients to be able to 'work out' where stuff goes, only to add predefined pages to predefined places (the 'Add New' shortcut button seems ideal for this), and to edit select content types (not sure these exist in PW). In Drupal, I set very rigid permissions of what they could or couldn't do using roles and permissions settings to avoid that phone call when you're on another job "The menus broken" (because they created too many top level pages and your cool CSS menu is now over two lines ). Looking to do something similar. Thanks in advance for any advice. Link to comment Share on other sites More sharing options...
DaveP Posted July 24, 2016 Share Posted July 24, 2016 in my case the two templates are 'blog' and 'blog-post'. 'blog' is the parent and only used once, while blog-post is the child and used many times. In the 'Family' tab on the template page for 'blog-post', I have things set up as in the attached image. This template cannot have children, but can be used for new pages. Its only allowable parent is 'blog'. If you go on the 'blog' template, the dropdown for allowed chidren will have a tick (checkmark) against 'blog-post'. This relationship between templates only needs to be set from one side to work, and I usually do it from the child template since it is when I am editing that that both sides of the relationship exist. 3 Link to comment Share on other sites More sharing options...
fbg13 Posted July 24, 2016 Share Posted July 24, 2016 Have you created the Blog page? I had the same happen to me, in my case i didn't have the parent page created. So to add a new blog entry, that is a child of blog, you first need to create its parent page. Go to the pages tree in the admin, hover over home and add a new page (your blog template). Link to comment Share on other sites More sharing options...
ottogal Posted July 25, 2016 Share Posted July 25, 2016 Quote When I try and set this up ... Did you use the Page Add Bookmark Editor to create the wanted bookmark under Add New ? 1 Link to comment Share on other sites More sharing options...
SamC Posted July 25, 2016 Author Share Posted July 25, 2016 On 7/24/2016 at 2:08 PM, DaveP said: in my case the two templates are 'blog' and 'blog-post'. 'blog' is the parent and only used once, while blog-post is the child and used many times. In the 'Family' tab on the template page for 'blog-post', I have things set up as in the attached image. This template cannot have children, but can be used for new pages. Its only allowable parent is 'blog'. If you go on the 'blog' template, the dropdown for allowed chidren will have a tick (checkmark) against 'blog-post'. This relationship between templates only needs to be set from one side to work, and I usually do it from the child template since it is when I am editing that that both sides of the relationship exist. I see, and the little tick is present. Working now. On 7/24/2016 at 2:27 PM, fbg13 said: Have you created the Blog page? I had the same happen to me, in my case i didn't have the parent page created. So to add a new blog entry, that is a child of blog, you first need to create its parent page. Go to the pages tree in the admin, hover over home and add a new page (your blog template). Yep, done this bit. 9 hours ago, ottogal said: Did you use the Page Add Bookmark Editor to create the wanted bookmark under Add New ? Doh! I thought it was automatic for some reason one the relationships were set up. So it works now, but it's not intuitive enough for a client. See the screenshot. 'Add New > Blog...' They wouldn't be adding a new blog, just a single post. Not really what I had in mind, should really say 'Add New > Blog entry'. I see it's using the 'title' field of the blog-index.php template, which is simply 'Blog'. If I change this to 'Blog post', the shortcut becomes 'Add New > Blog post' (but the displayed main title on the webpage also becomes 'Blog post', and the main navigation entry etc...). So, I thought maybe I could create a new field called 'shortcutText' in blog-index.php and use that to display whatever I wanted. However, not sure how to get the text into that dropdown seeing as it's using the 'title' field. That make sense? How do you guys handle this? Thanks for the replies so far, it's really helpful to get me up and running. 2 Link to comment Share on other sites More sharing options...
fbg13 Posted July 25, 2016 Share Posted July 25, 2016 32 minutes ago, SamC said: Doh! I thought it was automatic They are automatic. The automatic links have a plus icon while the bookmarks have an arrow icon. Does your blog page have the correct template? Link to comment Share on other sites More sharing options...
horst Posted July 25, 2016 Share Posted July 25, 2016 additionally to the family settings described above, you can enable / disable "add to new" (... something). It is enabled by default, but better you check this for the child template. Link to comment Share on other sites More sharing options...
horst Posted July 25, 2016 Share Posted July 25, 2016 here is a post with another detailed step by step explanation: 2 Link to comment Share on other sites More sharing options...
SamC Posted July 25, 2016 Author Share Posted July 25, 2016 12 minutes ago, fbg13 said: They are automatic. The automatic links have a plus icon while the bookmarks have an arrow icon. Does your blog page have the correct template? Yes it does. Now I know there are different icons, I can see that that 'Add new > Blog...' has an arrow. So what I've done now is the following, which works automatically which is awesome and just what I wanted. I had only set the (child) relationship on blog-index.php, but it seems you also need to set the (parent) relationship on blog-entry.php so the system knows this page can only go in one place with no ambiguity. This is an educated guess but any other method I tried (setting just one or the other) resulted in 'Add new > blog-post' disappearing out of the menu. 2 Link to comment Share on other sites More sharing options...
horst Posted July 25, 2016 Share Posted July 25, 2016 Nice, now you have found it. I have posted a link to another explanation for the rescue. But you don't need it anymore. 1 Link to comment Share on other sites More sharing options...
adrian Posted July 25, 2016 Share Posted July 25, 2016 Now add a label to the "blog-entry" template so that it reads "Blog Entry" or "Blog Post" or whatever you want. 3 Link to comment Share on other sites More sharing options...
SamC Posted July 25, 2016 Author Share Posted July 25, 2016 2 minutes ago, horst said: Nice, now you have found it. I have posted a link to another explanation for the rescue. But you don't need it anymore. Thanks for that. Just playing around with it, I like to know what's possible before embarking on anything. Plan first, make later! I see this setting: Admin > Setup > Templates > Edit Template: blog-entry > Advanced (tab) > 'Label for Page Name property' (Optionally override the default "Name" property label.) I changed this to something, tried creating a blog entry, had a look around, but (1) what does this field actually do? And (2) why do I get two links on the following page? (when I click '+ Add New' in the Pages dropdown). Link to comment Share on other sites More sharing options...
fbg13 Posted July 25, 2016 Share Posted July 25, 2016 You can have more add new pages (add new blog entry, add new event, add new gallery etc), so when you click the Add New link it doesn't know what kind of page you want. That's why you get that page so you can chose which one you want. Not sure if having only one should be different. 1 Link to comment Share on other sites More sharing options...
SamC Posted July 25, 2016 Author Share Posted July 25, 2016 13 minutes ago, adrian said: Now add a label to the "blog-entry" template so that it reads "Blog Entry" or "Blog Post" or whatever you want. Awesome! Totally hit the mark 4 minutes ago, fbg13 said: You can have more add new pages (add new blog entry, add new event, add new gallery etc), so when you click the Add New link it doesn't know what kind of page you want. That's why you get that page so you can chose which one you want. Not sure if having only one should be different. What I mean is, now I've changed the labels, things are looking much more like I would expect. Just wondering why this happens, with both grouped links pointing to the same place. + Blog entry Blog > ------------------------------ + Services entry Services > I would expect: + Blog entry ------------------------------ + Services entry Link to comment Share on other sites More sharing options...
fbg13 Posted July 25, 2016 Share Posted July 25, 2016 Child pages can have multiple parents of the same template, so they are listed there to chose a parent for you're child page. Just my guess. If i click on terms i get on a new page to chose a parent Clicking on a parent skips that page. 5 Link to comment Share on other sites More sharing options...
SamC Posted July 25, 2016 Author Share Posted July 25, 2016 13 minutes ago, fbg13 said: Child pages can have multiple parents of the same template, so they are listed there to chose a parent for you're child page. Just my guess. If i click on terms i get on a new page to chose a parent Clicking on a parent skips that page. Yes, of course, nice! Haven't got into taxonomy yet but the powers of PW are revealing themselves in a most pleasing way. Everything so far seems quite sensible with no outrageously complicated abstractions (looking at you Drupal 7). 4 Link to comment Share on other sites More sharing options...
ottogal Posted July 26, 2016 Share Posted July 26, 2016 Learned something new here, too. Thanks to all. 2 Link to comment Share on other sites More sharing options...
DaveP Posted July 26, 2016 Share Posted July 26, 2016 3 hours ago, ottogal said: Learned something new here, too. Thanks to all. Yep, me too. I'm guessing that maybe half a dozen people know PW well enough to be familiar with all the clever stuff available. And that is in no way a criticism - it's just that there are so many cool features (and more added almost weekly) that us mere mortals (me anyway) struggle to keep up. But it's an absolute joy to see threads like this. 4 Link to comment Share on other sites More sharing options...
JeevanisM Posted February 28, 2020 Share Posted February 28, 2020 I tried and followed these steps : as in the pic I have two templates floodcases ( this is list template to list all pages ) and floodsinglecase ( which is actually I want to see in the Add New Button >> FloodSingleCase I done this and this but I still dont see the option in the Add New Button : What could be the wrong step I am following now ? Any help would be thankful Link to comment Share on other sites More sharing options...
teppo Posted February 28, 2020 Share Posted February 28, 2020 4 hours ago, JeevanisM said: What could be the wrong step I am following now ? Any help would be thankful I don't see anything obviously wrong in your screenshots. This is probably a dumb question, but just checking: you've also added a page using the "floodcases" template somewhere? ? Link to comment Share on other sites More sharing options...
JeevanisM Posted February 29, 2020 Share Posted February 29, 2020 13 hours ago, teppo said: I don't see anything obviously wrong in your screenshots. This is probably a dumb question, but just checking: you've also added a page using the "floodcases" template somewhere? ? I think I did not but will check again and update Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now