Jump to content

Search the Community

Showing results for tags 'navigation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Hi, first of all thanks for this amazing CMS. I'm currently building my first page with PW, and I really like the concept. I have long years of experience with TYPO3, Wordpress, Joomla and some other more exotic systems, and I think PW just rocks, but I have difficulties to find the right/smart way for my ideas, due to lack of experience and know-how in the PW world. I guess what I'm trying to say -- be patient if waht I'm asking has been dealt with before or is a no-brainer for you guys with more PW-experience. I have a page "events" that I want to show in the navigation(s), since it features some editor-content. Sub pages of this will be "event" pages, and they shouldn't be showing in the main-navigation(s), since they will be linked via teaser boxes and such. Maybe later on, there will be the need to browse these events via their own navigation, but not right now. I understand that I can control the visibility of the "event" page via the page option. Now, it would be possible, but not comfortable, to ask the editor to make sure that "event" pages are published, but not visible. From my experience, this sooner or later will be trouble, because, well, people, you know… ;-) Is it possible to have a "default" status of published pages set (via the parent template)? -- I didn't find that kind of setting in the admin. Another way would be to control the navigation via the template, by simply not showing child pages when on the page "events". Now this is not so smart in my setup, because I opted to use the "MarkupSimpleNavigation.module" to build the main navigation and the navigation that'll show up on the page/content, if child pages are present. I found no way to tell the module to ignore (visible) child pages if in context of a certain page (other than to change the max level or depth setting). Currently I'm using a nav_main.inc.php and nav_sub.inc.php include throughout my frontend templates; I think it would be possible to switch the navigation module's behavior by chekcing for the page that includes them - but I don't want to clutter my code with if/else or switch conditions, if it can be avoided somehow So I think it boils down to: Either a way to set the visibility for new pages under "events" to hidden by default - which would work without the need to touch the navigation module, but may be not future-proof or a way to tell the navigation module if included in the "events" template to ignore the child pages, which can be done in several ways. A third way could be to separate the "events" content page from the "events" container page, but that's kind of, uhm, ugly I think the second way is the way to go, but out of curiosity, how would you take on the first one? Thanks for reading all this, Tom
  2. Hi all I have successfully built my very first navigation menu. It works by looping through the pages within a section and echoing the page title and url. The problem is, sometimes I will need a navigation link to take me to a page within a different section to the current one, and I have no idea how I could achieve this. Has anyone ever had to do this themselves, or have an idea how it could be achieved?
  3. Hello ProcessWire community, I'm brand new to this great CMS and used to work before with Joomla. I'm trying to understand more and more how ProcessWire works as I actually realize an project with it. I'm not an developer an my skills are yet restricted - I'm still learning . So far I'm doing fine until I sumbled over the navigation... I searcherd and read a lot here in the forum but I guess it would be great if someone could give an idea, the right path or a solution for what I need to realize: - Home (only an menu-icon) -> on click the next children show (got that done with a little jquery) - Child 1 - Sub-Child 1 - Sub-Child 2 - Sub-Child 3 - Child 2 - Child 3 ... -> Now, on mouseover of an child, I need the Sub-Children to show up -> toggle - Child 1 will swap to Sub-Child 1, Sub-Child 2, Sub-Child 3) but the main link remains still to parent (Child 1). Any help or ideas are very appreciated. Regards, Bacelo
  4. Hey. After playing around with the navigation for a bit I was curious if it is possible to use images instead of titles in the navigation. $homepage = $pages->get("/"); $children = $homepage->children("limit=21"); $children->prepend($homepage); foreach($children as $child) { $class = $child === $page->rootParent ? " class='on'" : ''; echo "<li><a$class href='{$child->url}'>{$child->nav_image}</a></li>"; } At the moment I have this which ofcourse won't work. Is there a way to display $child->nav_image as a image?
  5. Hi guys, if you have your page tree structure, some of the pages with children act solely as a container. So some of the time, at least when I am structuring web sites the pages don't provide any content themselves. On a regular web site I do these two types of pages are very common: Type 1: Pages that list content, like news items, articles or images and then link to their respective full content view. Type 2: Pages that contain full featured pages which are very individual in content so you don't want to list them on a landing page. How do you treat those type 2 pages in your navigation? I've been using two different methods: They are not clickable, so there is no link associated with them The link leads to their first child I recently added these as options with radio buttons (with the Page Field, more on that) to my custom "options" tab I use on templates: (●) links to first child ( ) no link So in my menu creation loop is use something like this ($currentPage being the current page within the loop): <? if ($currentPage->numChildren > 0 && $currentPage->options->has("name=links_to_first_child")): ?> <li><a href="<?= $currentPage->children->first()->url ?>"><?= $currentPage->title ?></a></li> <? elseif ($currentPage->options->has("name=no_link")): ?> <li><a href="#"><?= $currentPage->title ?></a></li> <? else: ?> <li><?= $currentPage->title ?></li> <? endif ?> So, just wanted to share my method and ask how you go about it.
  6. I have a slightly unusual setup where I'm using the first child of the root as my homepage like so: Root Home Page 2 Page 3 etc This is presenting me with a slight problem in that I need the Home url in the navigation tree to redirect to Root. Here's my navigation setup: <?php $root = $pages->get("/"); $children = $root->children(); foreach($children as $child) { echo "<li><a href='#{$child->name}'></a><a href='{$child->url}'><h1>{$child->title}</h1></a></li>"; } ?> I'm sure there's a nice easy way to do this in PW, can anyone help? For data setup I have Home rendered in the Root page. Looking at SEO would simply changing the menu structure be enough to stop robots indexing the root/Home url so that Home is seen as Root?
  7. Hey Guys I got a very basic and hopefully simple question about Templates. I need to display all Pages with a special template (e.g. "location_category") in my Navigation. My solution now: $location_cat = $template->get("location_category"); foreach($location_cat as $lc) { echo"<li><a href="{$li->url}">{$lc->title}</a></li>"; } but this doesn't work. Anyone a solution?
  8. First of all: I love Processwire and feel a strong urge to migrate all my clients systems from MODx Still, I have a little problem just now: I need to add two direct children to my front page (the top of the tree, which is opened on page load). I want the front page to appear in my menu (Already did this with MarkupSimpleNavigation) and have two direct child pages. Is there any way to accomplish this? I thought about just using the top-element as an empty one and somehow mark another page, which can have as many children as I want, as the default front page.
  9. Hi, This a total newbie question, but how can I modify the code below so that a specific css class (.last) is added to the last <li>? <?php $homepage = $pages->get("/"); $children = $homepage->children; $children->prepend($homepage); foreach($children as $child) { $class = $child === $page->rootParent ? "class='active'" : ''; echo "<li $class ><a href='{$child->url}'>{$child->title}</a></li>"; } ?>
  10. Hi guys, am having a problem with my navigation. For some reason the code I always use and is taken from Ryan's head.inc template is including hidden pages. The pages are also not displaying in the normal tree order. My code is the following: <ul id="main_nav" class="span3 hidden-phone"> <?php $homepage = $pages->get("/"); $children = $homepage->children; foreach($children as $child) { $class = ""; if ($child === $page->rootParent) { $class = ' class="active"'; } ?> <li class="nav_class_<?php echo ($xyz++%4); ?>"><a href="<?php echo $child->url; ?>"<?php echo $class; ?>><?php echo $child->title; ?></a></li> <?php } ?> </ul> <!-- /#main_nav.span3 hidden-phone --> Strange as this has always worked perfectly on all my other projects. Perhaps it's too late and I'm missing something obvious!
  11. I'm creating a menu for a site, I need to take pages url and title as follows STUDENTS MALE PETER JACOB ALDO FEMALE ANNA FRANCESCA I need to take up the third child 1st node STUDENTS 2nd node MALE/FEMALE 3rd node PETER/JACOB... if u use this code $sc = $pages->get("/students/"); $children = $sc->children; echo '<ul>'; foreach($children as $child) { $child === $page->rootParent; echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; } echo '</ul>'; I obtain MALE/FEMALE, how I can take PETER/JACOB and others??? thank u
  12. Hi Tried to move a page in the navigation to become a child page of another existing page, but it does not work. Any way I could do this in one move? Thanks
×
×
  • Create New...