 |

floodrod
User
Oct 25, 2006, 8:46 AM
Post #1 of 16
(3322 views)
Shortcut
|
|
Walkaround for external link checkbox and whatif rule
|
Can't Post
|
|
I am currently working with the external link options. Here's where I am at. I made a field called ExternalLinkOnly checkbox and labeled the selections y and n I pasted this code into the correct place in the template <!-- templateIf : $article.ExternalLinkOnly$ eq "y" --> <b>$article.title$</b> <!-- /templateIf --> <!-- templateIf : $article.ExternalLinkOnly$ ne "y" --> <b><a href="$published.articlePage.url$">$article.title$</a></b> <!-- /templateIf --> Everything works perfectly. External linked articles have no linked title just as I want, but the problem is, I am going to have to modify 1000+ articles and check the box on each article for the link on the title to dissapear. Is there alternate code that would automatically assume it's a external linked article if the external link field is filled in? Thanks
|
|
|  |
 |

George_h
User
Oct 17, 2007, 4:31 PM
Post #3 of 16
(2864 views)
Shortcut
|
|
Re: [Theo] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
Hello I have been having a good look around for the answer to my problem and this thread seems to be the nearest. In AM 1 we used to have the 'allow article types' in the set up and this allowed us to enter a URL for an external link in a box called 'Internet URL'. The end result would be a title with the following after it [Visit Website] Hopefully I have explained that okay. I want to be able to recreate this in AM 2, am I correct in thinking that I will have to create a new field called something like $article.externalLink$ and if that field is populated then there can be some sort of TemplateIf that will remove the link from the article title and place the link in a [Visit Website] box. If this has been covered somewhere else then I am sorry but I think a little tutorial on this would be way cool Many thanks for the continued hard work and great products [grovel grovel] Kind Regards George
|
|
|  |
 |

Jake
Staff
/ Moderator

Oct 19, 2007, 5:01 PM
Post #4 of 16
(2827 views)
Shortcut
|
|
Re: [George_h] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
Hi George, Thanks for posting! Did you take a look at the code Theo posted above? I think this covers the solution you're looking for. Let us know if you need anything else. ----------------------------------------------------------- Cheers, Jake Swanson - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

George_h
User
Oct 20, 2007, 9:34 AM
Post #5 of 16
(2817 views)
Shortcut
|
|
Re: [Jake] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
Hi Jake Sorry about that, I think I could not see the wood from the trees. Got everything working okay now Thanks Kind Regards George
|
|
|  |
 |

matrix
User
Nov 24, 2007, 3:32 PM
Post #6 of 16
(2385 views)
Shortcut
|
|
Re: [Jake] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
I really need a step by step description of exactly how to link the $article.title$ placeholder on a category index page to an external link whenever one is present, a la Article Manager 1. Unfortunately, we must have the choices that were present there, Link to Article, Link to Website, Link to File, and No Link. I've worked on this for longer than I'd like to admit, tried umpteen different solutions and keep getting only the dreaded unknown placeholder message. I have set up externalLink as a field in the database in Articles, Category and Publish Rules (all three just to be safe, since nothing was working). I did see a system field, externalURL, in the Publish Rules data field list, but it was hidden and I'm not sure whether it's relevant to this problem. Here is the code I've added to the categoryIndex.html template: <!-- templateIf : $article.externalLink$ ne "" --> <b><a href="$published.externalLink.url$">$article.title$</a></b> <!-- /templateIf --> <!-- templateIf : $article.externalLink$ eq "" --> <b><a href="$published.articlePage.url$">$article.title$</a></b> <!-- /templateIf --> Just can't get it to work. :( Thought I understood principles of AM2 (after reading, reading, reading) but am becoming very discouraged. Really, had no trouble making AM1 do most anything at all, with lots of custom scripting, so it's not necessarily that I'm without a brain, although by now am beginning to consider that possibility. Would love something like this: 1. Do this thing 2. Do this next 3. Broken down in an I-P way, please. Surely I'm not the only one who'd like to see this, even though I do see that George got it. (Way to go, George!) However, please note that I DO want the title linked when the external URL field contains data, unlike no link, as George did. Thank you so much. PS: I suppose I could just ask, how the heck the "Visit Website" link George used was coded, but also want to make sure the step by step is available...have a feeling that'll give insight into a lot more than this issue helping to prevent future frustration. Maybe. Thanks! Happy Interactive Tools product user since 1999
|
|
|  |
 |

Donna
Staff
/ Moderator

Nov 27, 2007, 11:06 AM
Post #7 of 16
(2339 views)
Shortcut
|
|
Re: [matrix] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
Hi Matrix, It looks like what you've got there should work. Which placeholder does it say doesn't exist? Can you let me know the exact error message? Donna
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

yubanet
User
Dec 29, 2007, 2:24 PM
Post #8 of 16
(2084 views)
Shortcut
|
|
Re: [Donna] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
Maybe a tad late, but here's how a workaround for external links. In the am_article database, select the "externalLink" and modify the field type to: Text box Then in the template section: categoryIndex.html template: <!-- templateIf : $article.externalLink$ eq "" --> <span class="head"><a href="$published.articlePage.url$">$article.title$</a></span><br /> <span class="articledate">Published $article.date$</span><br /> <span class="text">$article.summary$<br /> <br /> <a href="$published.articlePage.url$" class="summary_title">Read More</a></span> <br /> <!-- /templateIf --> <!-- templateIf : $article.externalLink$ ne "" --> <span class="head">$article.title$</span><br /> <span class="text">Full story: $article.externalLink$<br /> </span> <!-- /templateIf --> The same templateIf works for the generated headlines and rss. The only problem I see is articleManager still creates a page for each article that has an external link, but maybe one of the developers has an idea how to fix that *hint hint* :) hth Pascale
|
|
|  |
 |

nigelparry.net
User
May 17, 2008, 6:07 PM
Post #9 of 16
(1324 views)
Shortcut
|
|
Re: [Theo] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
I still feeling I'm missing something very basic conceptually about the placeholders/templates/publishing rules as a whole. Help me out here. I'm almost there! :-) Common types of category index pages one needs on a website would include lists of full articles on the server, lists of About Us type stuff that sorts by--say--title, and lists of external links. It used to be in AM 1 that someone would create a template for a category, chose article type and edit the various article type template cells accordingly, and then select that template in the Categories section. The new Publishing Rules has kind of turned that on its head. It seems to me, that you could mix external links and full articles with a templateIf command that checks if a field called External URL is filled or not. Fair enough. That could coexist on the same template and I get that. But if you wanted a section to sort by title instead of date it seems that you would need a separate Publishing Rule for that, but not necessarily a separate template because I suppose that the templateIfs could again all the things you need for an About (sort by title) page such as: remove Date and Author fields for certain categories. Am I correct so far? I hope so. :-) But this whole Placeholder Set Name is really confusing. I've read and reread the help and I'm just not getting it. I went the AM1 way and created a different template for use by my Resources (ie. Links) main section and subsections (all articles are basically summaries + external links). I then created a different Publishing Rule to sort this section and subsections differently, just to split it up from the regular articles, so I could see what was happening as I made changes. These links sections are publishing into a /resources/ directory. Obviously I wanted the main global Resources category to publish at /resources/index.shtml (actually this would be a good one to sort by date, so it shows latest resources added) And then the various subcategory resource pages (eg. Writing & Blogs) to publish at /resources/blogs.shtml with alphabetical listing from title, eg. Aaron's Blog, Brian's Blog, Charlie's Blog, Donna's Blog, etc. But the program won't let me name Resources' index file as "index.shtml" because that's in use by the global site index page. Even though it's in a different directory? Is this a bug or am I missing something. Then the other three main sections (other than Resources) ie. News, Factsheets, and About, start complaining that the Placeholder Set Name is already in use by the others. So I rename all of the placeholder.categoryIndex.suffix files accordingly, as in placeholder.categoryIndexLinks.suffix (for Resources) placeholder.categoryIndexNews.suffix (for News) placeholder.categoryIndexAbout.suffix (for About) placeholder.categoryIndexFacts.suffix (for Factsheets) and then, where it previously said "placeholder.categoryIndex.suffix" in the templates, I customize the Factsheets one by replacing that generic instance with placeholder.categoryIndexFacts.suffix. And from that point on none of the program's auto links in Factsheets worked. The link ends up looking like this: http://sitename.com/about/[unknown%20 placeholder%20$published.categoryIndex.url$] in the global category menus and breadcrumbs. If we're setting Placeholder Set Names in publishing rules then why won't the program acknowledge them? And this whole issue of not being able to call index files the same names without getting an "already in use" warning, even when you're specifying unique directories, what's that about? Assuming I let it default publish and FTP browse to find the files, I of course know how to get round that in SSI land by stuffing an index file into /resources/ and having it include whatever that cat's index file is but do I need to be doing that? I'm still in the middle of trial and erroring all of this so it wouldn't make much sense giving you a login, but if you look at the way I'm thinking it through above, what am I missing? It must be something obvious, and it must be something related to the new terminology, again! :-) That's all I can think of. I'm back off to the forums now. This post I'm replying to was extremely useful. But neither Theo's response nor the documentation seems to explain why we're using $article.fieldname$ in one instance, and placeholder.categoryIndex.webpath (or whatever) in another, and why our user-specified Placeholder Set Names don't work when you insert them into templates as placeholder.categoryIndexUNIQUENAME.webpage Has this been dealt with elsewhere? Apologies if so, but I'm, spending way too much time trawling the forums currently and not gittin' 'er done! :-) Thanks, Nigel _____________________ For more information about Nigel Parry and nigelparry.net websites please see http://nigelparry.net nigelparry.net: award-winning communications solutions for clients with something to say Website & print design Internet, public relations & media consulting
|
|
|  |
 |

Dave
Staff
/ Moderator

May 17, 2008, 7:24 PM
Post #10 of 16
(1321 views)
Shortcut
|
|
Re: [nigelparry.net] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
Nigel, It's been a while since I've done a AM1 to AM2 migration so I'll let the support staff correct me on any of this and provide more detail if needed on Monday. But... Here's a few things I can tell you. Everything in the publish rules, etc in AM2 was there in AM1. It was just hardcoded in the sourcecode so only we could change it. Placeholders were hardcoded with certain names, templates were hardcoded to use for certain files, etc. We just made it so you can change it and extend it yourself (for better or worse). Because the same article or category might publish many different files you need a way to link to (or include) specific files. Do you wantt include the article list for the sports category, or the front page top 3 sports stories include file. That's what the different placeholder name sets are for. So you know what you're referring to when multiple things are being published with the same data. If you're getting filename in use errors, we do have a hack to turn that off. But before you do that I think you can set the filename to be "<catFile>/index" or something similar in the publish rules. I'll let the support team comment more on that one. You can't have a placeholder set name in use by two publish rules that publish the same category/article. Because then it wouldn't know which one to link to when you use that name. Also, if you're getting a undefined placeholder error you'll want to make sure that you have a publish rule that publishes something for that article/category with that placeholder set name. Hope that makes (some) sense. Let us know if you get any further and I'll let Mike comment on this on Monday. He'll probably be able to explain it better than me! :) Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

nigelparry.net
User
Jun 2, 2008, 4:44 PM
Post #11 of 16
(951 views)
Shortcut
|
|
Re: [Dave] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
The publishing rules are still confusing the heck out of me. :-) Basically, let's say I have a site with 4 main categories: News, Factsheets, Links, About I want each of those categories to look different. So there will be 4 templates. Some (eg. News) will have dates next to article titles, and some (eg. About) will just have article titles and no dates. I create the 4 categories in the Categories section, and head over to Admin > Publishing, where the problems begin. I name the Placeholder for the About category categoryIndexAbout (the pre-existing default was categoryIndex). At this point, the global category menu starts flaking out. When I try and click on the category name I get a link that looks something like:
http://domain.com/[unknown%20placeholder%20$published.categoryIndex.url] Can't the global menu cope with categories that have unique placeholder names? The whole menu has stopped working in the way detailed above. The second thing I'm noticing is that in AM2 you still don't seem to be able to create a directory/filename structure for categories that looks like this, without resorting to SSIs: /news/index.shtml /factsheets/index.shtml /links/index.shtml /about/index.shtml etc. It seems to always want to publish the index file in the default directory, and then subsequent files in the named directory. And if you try to reuse the name index.shtml for multiple--even if each is being published in a subdirectory--you get a filename in use conflict error. I still feel like I'm missing something here. Help! :-) Nigel _____________________ For more information about Nigel Parry and nigelparry.net websites please see http://nigelparry.net nigelparry.net: award-winning communications solutions for clients with something to say Website & print design Internet, public relations & media consulting
|
|
|  |
 |

nigelparry.net
User
Jun 2, 2008, 6:16 PM
Post #12 of 16
(947 views)
Shortcut
|
|
Re: [nigelparry.net] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
Basically, I'm starting to get it working, by creating different templates for each main category--different article page templates, different breadcrumb templates, different category index pages, etc. Obviously some things can stay the same--eg. headline include templates. Or can they? Any time you create a category with a different placeholder name, the index, article, and breadcrumb templates seem to have to be split off and have the associated placeholder name to work. It doesn't seem to work with a default. This therefore seems to require many many more templates and publishing rules than one would have had in Artman 1. Artman 1 would have had a unique index and article template, but it wouldn't have needed unique headline, breadcrumb, etc., templates. Am I missing something, or is this the way it is? If the cat name for each category is defined in <catFile> and the index file is known by the program, how come there can't be a global $catFile$-type field name in the templates that figures out which is which? That only worked in the default AM installation before any templates were changed. Once new templates were added, they required separate publishing rules to call them, and this required separate placeholder names in order for these publishing rules to coexist with other publishing rules. This then throws out the default placeholder names in the templates. If you're in an amended template, links like $published.categoryIndex.url$ stop working. I'm confused and I totally feel I'm missing something here! ;-) Nigel _____________________ For more information about Nigel Parry and nigelparry.net websites please see http://nigelparry.net nigelparry.net: award-winning communications solutions for clients with something to say Website & print design Internet, public relations & media consulting
(This post was edited by nigelparry.net on Jun 2, 2008, 6:19 PM)
|
|
|  |
 |

MikeB
Staff
/ Moderator

Jun 3, 2008, 11:05 AM
Post #13 of 16
(925 views)
Shortcut
|
|
Re: [nigelparry.net] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
Hi Nigel, Thanks for posting! When you're setting up different categories on the site to have different designs (for their headlines, category index pages, articles, etc.) you are correct in that you'll need a different publishing rule so each of these categories will use a different template design. That said, it seems one of the main things that is causing issues right now is the "Placeholder Set Name" and using different values for this. To outline how you can set this up I'll use the example of the category index page as you did above. When you are ready to create a new publishing rule for the category index page for the "About" category, there are two steps you'll want to go through. First, go to the default "Category Indexes" publishing rule and ensure that the "About" category is excluded from the category filter so it's index page won't be published by this rule. Next, you can create the new publishing rule that you've described and the main thing to be sure of is that you leave the Placeholder Set Name as "categoryIndex". Leaving the name the same for all of the rules that publish your index pages means that your category menus will still work. The reason for this is because even though they are being published by different rules, all of the Category Index pages are still being published with the same placeholder name (which is used as part of the link in the menu). This should prevent you from running into broken links or having to modify any code in your category menu template. Also, while I'd have to take a look at how everything is set up in your installation of Article Manager I can let you know that you're definitely able to have one folder for each category with the index.shtml file published within that folder. In fact, this is the default set up with a fresh installation of the software and is probably just not present if you had upgraded from Article Manager 1. Hopefully these two items will point you in the right direction and let me know how things go from here. Thanks Nigel! Cheers, Mike Briggs - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

nigelparry.net
User
Jun 3, 2008, 11:30 AM
Post #14 of 16
(924 views)
Shortcut
|
|
Re: [MikeB] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
Mike, Thanks for clarifying all of this. So basically, you are saying that if you are happy with the default headline template or default breadcrumb template, you can reuse it for all categories safely? One part is still causing a problem though.
First, go to the default "Category Indexes" publishing rule and ensure that the "About" category is excluded from the category filter so it's index page won't be published by this rule. Next, you can create the new publishing rule that you've described and the main thing to be sure of is that you leave the Placeholder Set Name as "categoryIndex". This is pretty much what I did, but what was happening at the point I saved the second one is that the program gave the following error:
Placeholder is already in use by the following publish rule: Category Indexes (News) But this was happening weirdly--sporadicly. Sometimes I would get the error, sometimes I wouldn't. The various rules were not sharing any categories. One of the things that may have been causing it is that one of the categories was publishing into the root directory instead of its own directory. Could the error above have kicked in because of that? It might be worth adding another line to the error code if so! The main global menu is working again, which is good. :-) Thanks, Nigel _____________________ For more information about Nigel Parry and nigelparry.net websites please see http://nigelparry.net nigelparry.net: award-winning communications solutions for clients with something to say Website & print design Internet, public relations & media consulting
|
|
|  |
 |

nigelparry.net
User
Jun 3, 2008, 1:12 PM
Post #15 of 16
(916 views)
Shortcut
|
|
Re: [MikeB] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
So I get all of the four sections--About, Factsheets, News & Resources--working with the same "categoryIndex" placeholder. Then I try to add another category. This is the error message that I got:
Placeholder is already in use by the following publish rule: Category Index (About) Placeholder is already in use by the following publish rule: Category Indexes (Factsheets) Placeholder is already in use by the following publish rule: Category Indexes (News) Placeholder is already in use by the following publish rule: Category Indexes (Resources) Which doesn't make sense because if there was a problem, it wouldn't be letting me name the four category placeholders the same name before I even got to this fifth one, and therefore the error message above would be impossible. They definitely are not sharing categories. Bug? Nigel _____________________ For more information about Nigel Parry and nigelparry.net websites please see http://nigelparry.net nigelparry.net: award-winning communications solutions for clients with something to say Website & print design Internet, public relations & media consulting
|
|
|  |
 |

MikeB
Staff
/ Moderator

Jun 4, 2008, 12:21 PM
Post #16 of 16
(875 views)
Shortcut
|
|
Re: [nigelparry.net] Walkaround for external link checkbox and whatif rule
[In reply to]
|
Can't Post
|
|
Hi Nigel, Thanks for the post! I've tried playing around with this here on my end and the only way I was able to recreate a similar error message was if I created a new publishing rule but left the "Published Files" option set to "One file". Once I changed this to the appropriate setting, I was able to save this new publishing rule. I'd suggest double checking all of the details for this new rule to make sure everything looks in order and if you're not spotting anything you may want to send over your FTP details: https://www.interactivetools.com/support/email_support.cgi This way I can have a look at the specific publishing rules you have set up to see what might be happening. This is definitely something that can be set up and I'm sure that there's just one setting that needs to be tweaked so we can get this all up and running for you. I look forward to hearing from you! Cheers, Mike Briggs - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 | |  |
|